Commit Graph

28 Commits

Author SHA1 Message Date
Mahmood Ali fa4df28fcd
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 2d14c54fa0
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 8631e9dad5 always shutdown test server on test cleanup 2020-06-25 12:44:19 -04:00
Tim Gross b09b7a2475 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 9263fcb0d3 Multiregion deploy status and job status CLI 2020-06-17 11:03:34 -04:00
Jasmine Dahilig 51e141be7a 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 dbc014b360 Standardize retrieving a free port into a helper package 2017-10-23 16:48:20 -07:00
Alex Dadgar c106df9215 Switch to in-process agent 2017-07-20 21:07:32 -07:00
Diptanu Choudhury d0d7c92bab Added tests 2017-02-16 13:52:39 -08:00
Diptanu Choudhury 1b3c5e98c8 Renaming LocalDisk to EphemeralDisk (#1710)
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Diptanu Choudhury ec5afdae3d Fixed some more tests 2016-08-25 23:05:21 -05:00
Diptanu Choudhury 94571eab5d Attempting to fix alloc status test 2016-08-22 15:07:49 -05:00
Cameron Davison 15c343bbe4
add time flag to add created column to allocation 2016-08-07 19:44:56 -05:00
Alex Dadgar f38ed64938 Validate driver config on job register 2016-04-13 15:55:46 -07:00
Alex Dadgar d1011c9668 Fixes 2016-02-19 15:49:32 -08:00
Diptanu Choudhury c84a000416 Fixed some more tests 2016-02-11 22:33:41 -08:00
Diptanu Choudhury 9e994cb8d0 Fixed some tests 2016-02-11 10:42:56 -08:00
Alex Dadgar 4748bfd869 Tests 2016-02-02 13:50:30 -08:00
Ryan Uber 02529aee52 command: fix tests after job validation 2015-09-16 11:42:28 -07:00
Ryan Uber dd4e804d7e command: dump allocations for nodes in node-status 2015-09-15 11:20:08 -07:00
Ryan Uber 709c04dbde command: tests 2015-09-14 14:08:50 -07:00
Ryan Uber 4eddeebc9b command: guard tests from multiple parallel calls 2015-09-14 14:06:37 -07:00
Ryan Uber 7b5fd8a214 command: use meta struct for common options 2015-09-14 13:24:03 -07:00
Ryan Uber 18745e6e68 command: cleanup 2015-09-14 13:24:03 -07:00
Ryan Uber c363bc95f5 command: use testutil.TestServer in command tests 2015-09-14 13:24:03 -07:00
Ryan Uber b40d6715f6 command: cli tests 2015-09-14 13:24:03 -07:00
Ryan Uber 578934fb17 command: fix test agent helper 2015-09-14 13:24:03 -07:00
Ryan Uber fe245396d1 command: tests 2015-09-14 13:24:02 -07:00