Skip to content

Commit

Permalink
e2e: fix and modernize rescheduling test
Browse files Browse the repository at this point in the history
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". The test assertions are otherwise left untouched.
  • Loading branch information
tgross committed Nov 16, 2023
1 parent f66eb83 commit de74846
Show file tree
Hide file tree
Showing 8 changed files with 553 additions and 503 deletions.
2 changes: 1 addition & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
_ "github.com/hashicorp/nomad/e2e/podman"
_ "github.com/hashicorp/nomad/e2e/quotas"
_ "github.com/hashicorp/nomad/e2e/remotetasks"
_ "github.com/hashicorp/nomad/e2e/rescheduling"
_ "github.com/hashicorp/nomad/e2e/scaling"
_ "github.com/hashicorp/nomad/e2e/scalingpolicies"
_ "github.com/hashicorp/nomad/e2e/scheduler_sysbatch"
Expand All @@ -45,6 +44,7 @@ import (
_ "github.com/hashicorp/nomad/e2e/disconnectedclients"
_ "github.com/hashicorp/nomad/e2e/namespaces"
_ "github.com/hashicorp/nomad/e2e/nodedrain"
_ "github.com/hashicorp/nomad/e2e/rescheduling"
_ "github.com/hashicorp/nomad/e2e/volumes"
)

Expand Down
7 changes: 7 additions & 0 deletions e2e/rescheduling/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

package rescheduling

// This package contains only tests, so this is a placeholder file to
// make sure builds don't fail with "no non-test Go files in" errors
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ job "test" {
min_healthy_time = "1s"
auto_revert = true
healthy_deadline = "2s"
progress_deadline = "3s"
progress_deadline = "5s"
}

restart {
Expand Down
2 changes: 1 addition & 1 deletion e2e/rescheduling/input/rescheduling_maxp_autorevert.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ job "demo3" {
min_healthy_time = "1s"
auto_revert = true
healthy_deadline = "2s"
progress_deadline = "3s"
progress_deadline = "5s"
}

restart {
Expand Down
Loading

0 comments on commit de74846

Please sign in to comment.