core: Fix TestContext2Apply_cancelProvisioner
This test now requires a provisioner schema for correct operation.
This commit is contained in:
parent
032f908f4a
commit
e6f8b51111
|
@ -2001,7 +2001,19 @@ func TestContext2Apply_cancelProvisioner(t *testing.T) {
|
||||||
p := testProvider("aws")
|
p := testProvider("aws")
|
||||||
p.ApplyFn = testApplyFn
|
p.ApplyFn = testApplyFn
|
||||||
p.DiffFn = testDiffFn
|
p.DiffFn = testDiffFn
|
||||||
|
|
||||||
pr := testProvisioner()
|
pr := testProvisioner()
|
||||||
|
pr.GetSchemaResponse = provisioners.GetSchemaResponse{
|
||||||
|
Provisioner: &configschema.Block{
|
||||||
|
Attributes: map[string]*configschema.Attribute{
|
||||||
|
"foo": {
|
||||||
|
Type: cty.String,
|
||||||
|
Optional: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
ctx := testContext2(t, &ContextOpts{
|
ctx := testContext2(t, &ContextOpts{
|
||||||
Config: m,
|
Config: m,
|
||||||
ProviderResolver: providers.ResolverFixed(
|
ProviderResolver: providers.ResolverFixed(
|
||||||
|
@ -2043,9 +2055,7 @@ func TestContext2Apply_cancelProvisioner(t *testing.T) {
|
||||||
|
|
||||||
// Wait for completion
|
// Wait for completion
|
||||||
state := <-stateCh
|
state := <-stateCh
|
||||||
if applyDiags.HasErrors() {
|
assertNoErrors(t, applyDiags)
|
||||||
t.Fatalf("unexpected errors: %s", applyDiags.Err())
|
|
||||||
}
|
|
||||||
|
|
||||||
checkStateString(t, state, `
|
checkStateString(t, state, `
|
||||||
aws_instance.foo: (tainted)
|
aws_instance.foo: (tainted)
|
||||||
|
|
Loading…
Reference in New Issue