Commit Graph

28 Commits

Author SHA1 Message Date
Mahmood Ali
ff1b2f7623 tests: ensure that tests restore env-var values (#11309)
Fix a test corruption issue, where a test accidentally unsets
the `NOMAD_LICENSE` environment variable, that's relied on by some
tests.

As a habit, tests should always restore the environment variable value
on test completion. Golang 1.17 introduced
[`t.Setenv`](https://pkg.go.dev/testing#T.Setenv) to address this issue.
However, as 1.0.x and 1.1.x branches target golang 1.15 and 1.16, I
opted to use a helper function to ease backports.
2021-10-13 17:26:56 -04:00
Dave May
1bd132f09d debug: Improve namespace and region support (#11269)
* Include region and namespace in CLI output
* Add region and prefix matching for server members
* Add namespace and region API outputs to cluster metadata folder
* Add region awareness to WaitForClient helper function
* Add helper functions for SliceStringHasPrefix and StringHasPrefixInSlice
* Refactor test client agent generation
* Add tests for region
* Add changelog
2021-10-12 16:58:41 -04:00
Mahmood Ali
9741c2a88c always shutdown test server on test cleanup 2020-06-25 12:44:19 -04:00
Tim Gross
02209b1371 Multiregion job registration
Integration points for multiregion jobs to be registered in the enterprise
version of Nomad:
* hook in `Job.Register` for enterprise to send job to peer regions
* remove monitoring from `nomad job run` and `nomad job stop` for multiregion jobs
2020-06-17 11:04:58 -04:00
Drew Bailey
ce8f230cab Multiregion deploy status and job status CLI 2020-06-17 11:03:34 -04:00
Jasmine Dahilig
c467a94e2b backfill region from job hcl in jobUpdate and jobPlan endpoints
- updated region in job metadata that gets persisted to nomad datastore
- fixed many unrelated unit tests that used an invalid region value
(they previously passed because hcl wasn't getting picked up and
the job would default to global region)
2019-06-13 08:03:16 -07:00
Alex Dadgar
e1b1465081 Standardize retrieving a free port into a helper package 2017-10-23 16:48:20 -07:00
Alex Dadgar
da25a3d5ce Switch to in-process agent 2017-07-20 21:07:32 -07:00
Diptanu Choudhury
5502a669e8 Added tests 2017-02-16 13:52:39 -08:00
Diptanu Choudhury
396e45629b Renaming LocalDisk to EphemeralDisk (#1710)
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Diptanu Choudhury
efb0d3de8a Fixed some more tests 2016-08-25 23:05:21 -05:00
Diptanu Choudhury
5036f24591 Attempting to fix alloc status test 2016-08-22 15:07:49 -05:00
Cameron Davison
40bc21fa8f add time flag to add created column to allocation 2016-08-07 19:44:56 -05:00
Alex Dadgar
6c32b1ebd8 Validate driver config on job register 2016-04-13 15:55:46 -07:00
Alex Dadgar
73733a8542 Fixes 2016-02-19 15:49:32 -08:00
Diptanu Choudhury
05999809aa Fixed some more tests 2016-02-11 22:33:41 -08:00
Diptanu Choudhury
38ec33c508 Fixed some tests 2016-02-11 10:42:56 -08:00
Alex Dadgar
7ea6619928 Tests 2016-02-02 13:50:30 -08:00
Ryan Uber
da35ecc4f3 command: fix tests after job validation 2015-09-16 11:42:28 -07:00
Ryan Uber
550434dc9b command: dump allocations for nodes in node-status 2015-09-15 11:20:08 -07:00
Ryan Uber
f19682d87e command: tests 2015-09-14 14:08:50 -07:00
Ryan Uber
ac6de2c157 command: guard tests from multiple parallel calls 2015-09-14 14:06:37 -07:00
Ryan Uber
7e26f938a2 command: use meta struct for common options 2015-09-14 13:24:03 -07:00
Ryan Uber
0e16348052 command: cleanup 2015-09-14 13:24:03 -07:00
Ryan Uber
4b708bf6df command: use testutil.TestServer in command tests 2015-09-14 13:24:03 -07:00
Ryan Uber
8246db154d command: cli tests 2015-09-14 13:24:03 -07:00
Ryan Uber
8698c1d757 command: fix test agent helper 2015-09-14 13:24:03 -07:00
Ryan Uber
0f597d3984 command: tests 2015-09-14 13:24:02 -07:00