Commit Graph

32 Commits

Author SHA1 Message Date
Tim Gross
a9beef7edd jobspec: remove HCL1 support (#23912)
This changeset removes support for parsing jobspecs via the long-deprecated
HCLv1.

Fixes: https://github.com/hashicorp/nomad/issues/20195
Ref: https://hashicorp.atlassian.net/browse/NET-10220
2024-09-05 09:02:45 -04:00
Tim Gross
da61d278d0 e2e: fix and modernize rescheduling test (#19105)
The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of #17342

This changeset also updates the whole test suite to move it off the v1
"framework". A few test assertions are also de-flaked.

Fixes: #19076
2023-11-16 15:39:18 -05:00
hashicorp-copywrite[bot]
a9d61ea3fd Update copyright file headers to BUSL-1.1 2023-08-10 17:27:29 -05:00
hashicorp-copywrite[bot]
f005448366 [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
James Rasell
c2b5a5ebd9 e2e: account for new job stop CLI exit behaviour.
PR #11550 changed the job stop exit behaviour when monitoring the
deployment. When stopping a job, the deployment becomes cancelled
and therefore the CLI now exits with status code 1 as it see this
as an error.

This change adds a new utility e2e function that accounts for this
behaviour.
2022-02-01 14:16:37 +01:00
James Rasell
3bffe443ac chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
Mahmood Ali
26685b2efa e2e: wait for allocs and deployments (#10967)
As we moved to using `-detach` for registering jobs, we should wait
until allocs and deployments are created before asserting their
properties.

Fixing `TestNodeDrainIgnoreSystem` and `TestRescheduleProgressDeadlineFail` tests as they seem particularly flaky, failing 9 and 7 times (respectively) in the last two weeks.
2021-07-29 10:52:04 -04:00
Tim Gross
b63d3ffc54 e2e: eliminate race condition causing rescheduling test flake (#9085)
The autorevert test checks for reverted allocations to be placed and running
before checking the deployment status, but the deployment can be completed and
marked "successful" before we check it for "running" status. Instead, just
wait for it to be marked "successful" and assert we have the expected count of
deployment statuses.
2020-10-14 11:35:30 -04:00
Tim Gross
8cf583fe48 e2e: cleanup errors should use assert, not require (#8989)
The E2E framework wraps testify's `require` so that by default we can stop
tests on errors, but the cleanup functions should use `assert` so that we
continue to try to cleanup the test environment even if there's a failure.
2020-09-30 09:00:37 -04:00
Tim Gross
dd0333c759 e2e: rework rescheduling progress deadline test (#8958)
Eliminate sources of randomness in the progress deadline test and clarify the
purpose of the test to check for progress deadline updates.
2020-09-29 11:02:16 -04:00
Tim Gross
c9d5048e2f e2e: namespace support for CLI helpers (#8978)
Required to support tests for namespaces and other ENT features.
2020-09-28 16:37:34 -04:00
Tim Gross
e9f8ad737e e2e: reschedule tests should check for non-zero rescheduled allocs (#8927)
The conditional around some of the rescheduling tests was backwards, where we
were waiting for allocations to be rescheduled but testing for a count of
0. The test was passing but flaky because if the check happened quickly enough
before the scheduler rescheduled the allocations, it would pass.
2020-09-21 08:17:24 -04:00
Tim Gross
2ec1eb4ec6 e2e: refactor CLI utils out of rescheduling test (#8905)
The CLI helpers in the rescheduling test were intended for shared use, but
until some other tests were written we didn't want to waste time making them
generic. This changeset refactors them and adds some new helpers associated
with the node drain tests (under separate PR).
2020-09-16 16:10:06 -04:00
Tim Gross
04ee35b13f e2e: constrain rescheduling test workloads to Linux (#8872)
The rescheduling test workloads were created before we had Windows targets in
the E2E nightly run. When these were recently ported to the e2e framework they
were missing the constraint to Linux machines.

Also added a little extra time to polling to avoid some flakiness on the first
run, and a minor readability adjustment to the job names.
2020-09-11 09:21:28 -04:00
Tim Gross
2b49ae30aa e2e: rescheduling tests
Ports the rescheduling tests (which aren't running in CI) into the current
test framework so that they're run on nightly, and exercises the new CLI
helpers.
2020-09-10 13:00:37 -04:00
Danielle Lancashire
1cd86141d9 chore: Format hcl configurations 2019-07-20 16:55:07 +02:00
Preetha Appan
af2ed66749 Add flag similar to --all for allocs to be able to filter deployments by latest 2019-05-13 18:33:41 -05:00
Preetha Appan
e8162d076f Add more end to end tests for progress deadline and fix flaky test 2018-06-05 17:25:28 -05:00
Preetha Appan
ceafb2b354 Update end to end tests to use shorter progress deadlines 2018-05-07 14:55:01 -05:00
Preetha Appan
801d147e83 More e2e test fixes after changes to rescheduling during deployments 2018-05-07 14:55:01 -05:00
Preetha Appan
83ad99c436 Some test fixes to e2e rescheduling tests 2018-05-07 14:55:01 -05:00
Michael Schurter
a3dba1db78 rkt: test Stats() and always run tests
Remove the NOMAD_TEST_RKT flag as a guard for rkt tests. Still require
Linux, root, and rkt to be installed. Only check for rkt installation
once in hopes of speeding up rkt tests a bit.
2018-04-24 11:05:42 -07:00
Preetha Appan
97d39b158f Another e2e rescheduling test case 2018-03-29 20:48:55 -05:00
Preetha Appan
9a5b63c1c4 more e2e rescheduling tests 2018-03-29 19:04:18 -05:00
Preetha Appan
3809c53a2b remove unused 2018-03-29 14:42:21 -05:00
Preetha Appan
db2bdb4410 More e2e tests 2018-03-29 11:35:45 -05:00
Preetha Appan
f62f3d8176 Update rescheduling job specs in integration test 2018-03-29 07:42:10 -05:00
Preetha Appan
f4f178b46c Fix linting 2018-03-19 18:10:58 -05:00
Preetha Appan
52d1a9c41a Make suggested interval round to seconds, and more end to end test cases 2018-03-19 14:56:52 -05:00
Preetha Appan
5e7082bd84 Small tweaks to rescheduling e2e tests 2018-03-17 09:56:10 -05:00
Preetha Appan
3fcf44edbf Add README and other review feedback 2018-03-09 16:24:59 -06:00
Preetha Appan
4d45aea019 Initial commit of end to end tests integration tests for rescheduling using ginkgo 2018-03-09 16:24:50 -06:00