Skip to content

Instantly share code, notes, and snippets.

@ywkaras
Created November 8, 2018 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ywkaras/a13ba042aa52ec43bcc78b1980d099e9 to your computer and use it in GitHub Desktop.
Save ywkaras/a13ba042aa52ec43bcc78b1980d099e9 to your computer and use it in GitHub Desktop.
Au / Gold Test
In TS repo subdir tests. In this dir, run ./autest.sh --ats-bin <install-ats-bin-path> -f <test-name> where <test-name>.test.py file is in the gold_tests dir tree.
Some of the python code for Au Test is in files with a .ext extension rather than a .py extension.
TS/tests/gold_tests/autest-site contains python extensions that are specific to trafficserver for Au Test.
Weird failures can be caused by a ‘stale’ env-test subdirectory. If you do ‘rm -rf env-test’, this will trigger bootstrap.py to re-run, getting the latest contents for env-test.
Test.RunDirectory - _sandbox/<test-name>
Test.TestDirectory - directory with <test-name>.test.py file.
Test.AtsTestToolsDir - TS/tests/tools
ts = Test.MakeATSProcess("ts")
ts.port - cleartext port
ts.ssl_port - TLS encrypted port
Test.Env is an “environment” dictionary. Test.Env[‘PWD’] gives the path of current working directory for example.
`` in a gold file will match any sequence of chars preceding the literal text (or end of line) following it when comparing to a gold file. For example:
Date: 25Jun1962
Will match:
Date: ``Jun``
In the gold file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment