interrupted execution now exits with an error
This commit is contained in:
parent
95f30451d9
commit
f987b69777
|
@ -924,7 +924,7 @@ func TestApply_shutdown(t *testing.T) {
|
|||
"-auto-approve",
|
||||
testFixturePath("apply-shutdown"),
|
||||
}
|
||||
if code := c.Run(args); code != 0 {
|
||||
if code := c.Run(args); code != 1 {
|
||||
t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
|
||||
}
|
||||
|
||||
|
|
|
@ -845,12 +845,8 @@ func TestPlan_shutdown(t *testing.T) {
|
|||
"-state=nonexistent.tfstate",
|
||||
testFixturePath("apply-shutdown"),
|
||||
})
|
||||
if code != 0 {
|
||||
// FIXME: In retrospect cancellation ought to be an unsuccessful exit
|
||||
// case, but we need to do that cautiously in case it impacts automation
|
||||
// wrappers. See the note about this in the terraform.stopHook
|
||||
// implementation for more.
|
||||
t.Errorf("wrong exit code %d; want 0\noutput:\n%s", code, ui.OutputWriter.String())
|
||||
if code != 1 {
|
||||
t.Errorf("wrong exit code %d; want 1\noutput:\n%s", code, ui.OutputWriter.String())
|
||||
}
|
||||
|
||||
select {
|
||||
|
|
Loading…
Reference in New Issue