Commit Graph

18 Commits

Author SHA1 Message Date
Tim Gross
0b6b475e7d e2e: update framework to allow deploying Nomad (#6969)
The e2e framework instantiates clients for Nomad/Consul but the
provisioning of the actual Nomad cluster is left to Terraform. The
Terraform provisioning process uses `remote-exec` to deploy specific
versions of Nomad so that we don't have to bake an AMI every time we
want to test a new version. But Terraform treats the resulting
instances as immutable, so we can't use the same tooling to update the
version of Nomad in-place. This is a prerequisite for upgrade testing.

This changeset extends the e2e framework to provide the option of
deploying Nomad (and, in the future, Consul/Vault) with specific
versions to running infrastructure. This initial implementation is
focused on deploying to a single cluster via `ssh` (because that's our
current need), but provides interfaces to hook the test run at the
start of the run, the start of each suite, or the start of a given
test case.

Terraform work includes:
* provides Terraform output that written to JSON used by the framework
  to configure provisioning via `terraform output provisioning`.
* provides Terraform output that can be used by test operators to
  configure their shell via `$(terraform output environment)`
* drops `remote-exec` provisioning steps from Terraform
* makes changes to the deployment scripts to ensure they can be run
  multiple times w/ different versions against the same host.
2020-01-22 08:48:52 -05:00
Preetha Appan
787e37860b Basic consul registration e2e 2019-01-26 10:58:25 -06:00
Danielle Tomlinson
646e077d32 e2e: Add consultemplate test
This adds a basic test for consul template, that verifies the behaviour
of consul-template with task blocking and restarting of tasks
2019-01-07 17:53:55 +01:00
Preetha Appan
7ad040166d new e2e test for spread, and refactor affinity tests to share util methods 2018-12-19 21:25:32 -06:00
Preetha Appan
4453602c24 Make affinity e2e tests wait for leader through Before method 2018-12-19 09:56:44 -06:00
Nick Ethier
ea0e32a177 e2e/framework: fix linting 2018-07-31 13:03:52 -04:00
Nick Ethier
134a0c41cd e2e/framework: code review fixes 2018-07-24 12:33:30 -04:00
Nick Ethier
165baa4ee1 e2e/framework: add framework.F context 2018-07-11 13:19:14 -04:00
Nick Ethier
7fcd9e23b1 e2e/framework: move *testing.T access to a context *framework.F which is scoped to each test 2018-07-11 13:12:23 -04:00
Nick Ethier
7c9ba61ae7 e2e/framework: strip flag prefix and use testify/require for embedded assertions 2018-07-11 13:12:23 -04:00
Nick Ethier
2f9d663bba e2e/framework: don't require NOMAD_ADDR and instead rely on defaults 2018-07-11 13:12:23 -04:00
Nick Ethier
4fba59748f e2e/framework: remove 'step' naming and wording 2018-07-11 13:12:23 -04:00
Nick Ethier
4b0010b74a e2e/framework: add missing errorf var 2018-07-11 13:12:23 -04:00
Nick Ethier
8353c54169 e2e/framework: cleanup provisioner and more docs 2018-07-11 13:12:23 -04:00
Nick Ethier
a30a5519f3 e2e/framework: additional documentation 2018-07-11 13:12:23 -04:00
Nick Ethier
7c224cf766 e2e/framework: add consul and vault client detection 2018-07-11 13:12:23 -04:00
Nick Ethier
cb9e1e14a4 e2e/framework: add minimal godocs 2018-07-11 13:12:23 -04:00
Nick Ethier
8be5b65324 e2e/framework: initial e2e framework implementation 2018-07-11 13:12:23 -04:00