mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
testing: fix vault setup test's reliance on specific Raft index (#25806)
The test for `nomad setup vault` command expects a specific `CreateIndex` for the job it creates. Any Raft write when a server comes up or establishes leadership can cause this test to break. Interpolate the expected index as we've done for other indexes on the job to make this test less brittle. Ref: https://github.com/hashicorp/nomad-enterprise/pull/2673#issuecomment-2847619747
This commit is contained in:
@@ -87,7 +87,7 @@ test default batch pending
|
||||
expectedOut: fmt.Sprintf(`{
|
||||
"JobsWithoutVaultIdentity": [
|
||||
{
|
||||
"CreateIndex": 10,
|
||||
"CreateIndex": %d,
|
||||
"Datacenters": [
|
||||
"dc1"
|
||||
],
|
||||
@@ -111,7 +111,7 @@ test default batch pending
|
||||
"OutdatedNodes": [],
|
||||
"VaultTokens": null
|
||||
}
|
||||
`, *job.CreateIndex, *job.ModifyIndex, *job.SubmitTime),
|
||||
`, *job.CreateIndex, *job.CreateIndex, *job.ModifyIndex, *job.SubmitTime),
|
||||
},
|
||||
{
|
||||
name: "-check with -t",
|
||||
|
||||
Reference in New Issue
Block a user