open-nomad/e2e
Tim Gross 55ee7a220b
e2e: fixes for race conditions in testing (#6300)
- In script checks, ensure we're running `Exec` against the new running
  allocation and not the earlier stopped one.
- In script checks, allow `Exec` calls to error due to lack of pty when
  we use the exec to kill the task.
- In `utils.go/RegisterAllocs`, force query for allocations to wait on
  wait index returned by registration call.
2019-09-10 13:45:16 -04:00
..
affinities e2e: add tests for nomad driver upgrade path 2019-01-17 23:32:45 -05:00
allocstats Remove unnecessary step in getting node client 2019-04-01 10:45:41 -05:00
bin e2e update shell scripts argument quoting 2019-06-04 15:52:32 -04:00
cli fix panic 2018-09-18 13:02:03 -07:00
clientstate test: properly skip client state in beforeall 2019-03-22 06:42:04 -07:00
connect e2e: test demo job for connect 2019-09-04 12:40:08 -07:00
consul e2e: fixes for race conditions in testing (#6300) 2019-09-10 13:45:16 -04:00
consultemplate Fix double restart counting for templates 2019-01-25 15:38:13 -08:00
deployment e2e/deployment DeploymentsForJob fail instead of nil, error passing 2019-06-04 14:31:42 -04:00
e2eutil e2e: fixes for race conditions in testing (#6300) 2019-09-10 13:45:16 -04:00
example e2e/cli: fix formatting 2018-07-31 13:52:25 -04:00
execagent e2e: add NomadAgent and basic client state test 2019-03-21 07:14:34 -07:00
fabio prometheus and fabio for metrics 2019-03-11 09:21:04 -05:00
framework remove stray println 2019-03-21 09:23:37 -05:00
metrics docs: update s3 urls to use virtual bucket style 2019-05-06 10:39:51 -04:00
migrations chore: Format hcl configurations 2019-07-20 16:55:07 +02:00
nomad09upgrade e2e: add NomadAgent and basic client state test 2019-03-21 07:14:34 -07:00
nomadexec add e2e tests for nomad exec 2019-05-09 16:49:08 -04:00
prometheus prometheus and fabio for metrics 2019-03-11 09:21:04 -05:00
rescheduling chore: Format hcl configurations 2019-07-20 16:55:07 +02:00
spread e2e: add tests for nomad driver upgrade path 2019-01-17 23:32:45 -05:00
taskevents e2e: add tests for nomad driver upgrade path 2019-01-17 23:32:45 -05:00
terraform e2e: tag instances with origin (#6293) 2019-09-06 15:49:18 -04:00
upgrades chore: Format hcl configurations 2019-07-20 16:55:07 +02:00
vault vault e2e: pass vault version into setup instead of having to infer it from test name 2019-04-10 10:34:10 -05:00
e2e.go e2e: skip e2e tests during normal go test runs 2018-07-31 12:42:36 -04:00
e2e_test.go e2e: test demo job for connect 2019-09-04 12:40:08 -07:00
README.md e2e bin/update and bin/run, README 2019-06-04 13:42:07 -04:00

End to End Tests

This package contains integration tests.

The terraform folder has provisioning code to spin up a Nomad cluster on AWS. The tests work with the NOMAD_ADDR environment variable which can be set either to a local dev Nomad agent or a Nomad client on AWS.

Local Development

The workflow when developing end to end tests locally is to run the provisioning step described below once, and then run the tests as described below. When making local changes, use ./bin/update $(which nomad) /usr/local/bin/nomad and ./bin/run sudo systemctl restart nomad to destructively modify the provisioned cluster.

Provisioning

You'll need AWS credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) to create the Nomad cluster. See the README for details. The number of servers and clients is configurable, as is the configuration file for each client and server.

Running

After completing the provisioning step above, you should see CLI output showing the IP addresses of Nomad client machines. To run the tests, set the NOMAD_ADDR variable to http://[client IP]:4646/

$ NOMAD_ADDR=<> NOMAD_E2E=1 go test -v