A command-line utility to trigger builds in teamcity to run provider acceptance tests. Given a PR# it can find the files modified, tests to run and generate a TEST_PATTERN.
To install tctest from the command line, you can run:
go install github.com/katbyte/tctestWhile all commands can be configured from the command line, environment variables can be used instead. By creating a file such as set_env_example.sh, it can then be sourced:

To run a build on a branch with a test pattern:
tctest branch master TestAcc -s ci.katbyte.me -b AzureRm -u katbyteor when environment variables are set:
tctest branch master TestAccTo run a build on the merge branch with a specific test pattern:
tctest pr 3232 TestAcc -s ci.katbyte.me -b AzureRm -u katbyte -r terraform-providers/terraform-provider-azurermIf no test pattern is specified the modified files in the PR will be checked and it will be generated automatically:
tctest pr 3232Multiple PRs can be specified at once
tctest pr 3232,5454,7676To list all the tests discovered for a given PR:
tctest list 3232To run tests against a PR and display results when complete:
tctest pr 3232 --waitBy TeamCity Build Number
To show the PASS/FAIL/SKIP results for a TeamCity build number:
tctest results 12345To wait for a running or queued build to complete and then show the results:
tctest results 12345 --waitBy Github PR Number
To show the PASS/FAIL/SKIP results for all TeamCity builds for a Github PR:
tctest results pr 12345To show the PASS/FAIL/SKIP results for the latest TeamCity build for a Github PR:
tctest results pr 12345 --latestTo wait for a running or queued build to complete and then show the results:
tctest results pr 12345 --wait
