unused err value and nil context

Incorrect err assignment had no effect.

Never use a nil context.
pull/27081/head
James Bardin 5 years ago
parent d2c2d58f09
commit 96436f526a

@ -495,10 +495,10 @@ func (b *Remote) confirm(stopCtx context.Context, op *backend.Operation, opts *t
}
if err == errRunDiscarded {
err = errApplyDiscarded
if op.Destroy {
err = errDestroyDiscarded
}
err = errApplyDiscarded
}
result <- err

@ -195,7 +195,7 @@ func TestRemoteContextWithVars(t *testing.T) {
key := "key"
v.Key = &key
}
b.client.Variables.Create(nil, workspaceID, *v)
b.client.Variables.Create(context.TODO(), workspaceID, *v)
_, _, diags := b.Context(op)

Loading…
Cancel
Save