Merge pull request #14223 from hashicorp/b-update-nomad-tests
provider/nomad: Update Nomad provider tests
This commit is contained in:
commit
d63ad7f949
|
@ -288,7 +288,11 @@ func testResourceJob_updateCheck(s *terraform.State) error {
|
|||
// Verify foo doesn't exist
|
||||
job, _, err := client.Jobs().Info("foo", nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error reading %q job: %s", "foo", err)
|
||||
// Job could have already been purged from nomad server
|
||||
if !strings.Contains(err.Error(), "(job not found)") {
|
||||
return fmt.Errorf("error reading %q job: %s", "foo", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if job.Status != "dead" {
|
||||
return fmt.Errorf("%q job is not dead. Status: %q", "foo", job.Status)
|
||||
|
|
Loading…
Reference in New Issue