diff --git a/test/.gitignore b/test/.gitignore index bee8a64..fdc9d46 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1 +1,2 @@ __pycache__ +test_data.json diff --git a/test/test_data.json b/test/test_data.json deleted file mode 100644 index 8dd4bb4..0000000 --- a/test/test_data.json +++ /dev/null @@ -1,84 +0,0 @@ -[ - {"headers": [["traceparent", "00-00000000000000000000000000000000-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": true}, - {"headers": [], "is_traceparent_valid": false}, - {"headers": [], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789011-1234567890123456-01"], ["traceparent", "00-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [], "is_traceparent_valid": false}, - {"headers": [], "is_traceparent_valid": false}, - {"headers": [["TraceParent", "00-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": true}, - {"headers": [["TrAcEpArEnT", "00-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": true}, - {"headers": [["TRACEPARENT", "00-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01 "]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01\t"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01 \t"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-0000000000000000-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-.234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-123456789012345.-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-12345678901234567-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-123456789012345-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-.0"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-0."]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-001"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-1"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-00000000000000000000000000000000-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-.2345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-1234567890123456789012345678901.-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-123456789012345678901234567890123-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-1234567890123456789012345678901-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01."]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-01-what-the-future-will-be-like"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "cc-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "cc-12345678901234567890123456789012-1234567890123456-01-what-the-future-will-be-like"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "cc-12345678901234567890123456789012-1234567890123456-01.what-the-future-will-be-like"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "ff-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", ".0-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "0.-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "000-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "0000-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "0-12345678901234567890123456789012-1234567890123456-01"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "abcdefghijklmnopqrstuvwxyz0123456789_-*/= !\"#$%&'()*+-./0123456789:;<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "abcdefghijklmnopqrstuvwxyz0123456789_-*/@a-z0-9_-*/= !\"#$%&'()*+-./0123456789:;<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1,foo=1"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1,foo=2"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"], ["tracestate", "foo=1"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"], ["tracestate", "foo=2"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", ""]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"], ["tracestate", ""]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", ""], ["tracestate", "foo=1"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"]], "is_traceparent_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["TraceState", "foo=1"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["TrAcEsTaTe", "foo=1"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["TRACESTATE", "foo=1"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1,bar=2"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["tracestate", "foo=1"]], "is_traceparent_valid": false}, - {"headers": [["tracestate", "foo=1,bar=2"]], "is_traceparent_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo =1"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "FOO=1"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo.bar=1"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo@=1,bar=2"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "@foo=1,bar=2"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo@@bar=1,bar=2"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo@bar@baz=1,bar=2"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"], ["tracestate", "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz=1"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"], ["tracestate", "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz=1"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"], ["tracestate", "ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt@vvvvvvvvvvvvvv=1"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"], ["tracestate", "tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt@v=1"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"], ["tracestate", "t@vvvvvvvvvvvvvvv=1"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "bar01=01,bar02=02,bar03=03,bar04=04,bar05=05,bar06=06,bar07=07,bar08=08,bar09=09,bar10=10"], ["tracestate", "bar11=11,bar12=12,bar13=13,bar14=14,bar15=15,bar16=16,bar17=17,bar18=18,bar19=19,bar20=20"], ["tracestate", "bar21=21,bar22=22,bar23=23,bar24=24,bar25=25,bar26=26,bar27=27,bar28=28,bar29=29,bar30=30"], ["tracestate", "bar31=31,bar32=32"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "bar01=01,bar02=02,bar03=03,bar04=04,bar05=05,bar06=06,bar07=07,bar08=08,bar09=09,bar10=10"], ["tracestate", "bar11=11,bar12=12,bar13=13,bar14=14,bar15=15,bar16=16,bar17=17,bar18=18,bar19=19,bar20=20"], ["tracestate", "bar21=21,bar22=22,bar23=23,bar24=24,bar25=25,bar26=26,bar27=27,bar28=28,bar29=29,bar30=30"], ["tracestate", "bar31=31,bar32=32,bar33=33"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1,bar=2"], ["tracestate", "rojo=1,congo=2"], ["tracestate", "baz=3"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1 \t , \t bar=2, \t baz=3"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1\t \t,\t \tbar=2,\t \tbaz=3"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1 "]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1\t"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=1 \t"]], "is_traceparent_valid": true, "is_tracestate_valid": true}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=bar=baz"]], "is_traceparent_valid": true, "is_tracestate_valid": false}, - {"headers": [["traceparent", "00-12345678901234567890123456789012-1234567890123456-00"], ["tracestate", "foo=,bar=3"]], "is_traceparent_valid": true, "is_tracestate_valid": false} -]