core: update provisioner test fixtures
They need to conform to the test schema
This commit is contained in:
parent
ec8df26a80
commit
2f6787c9b2
|
@ -4252,8 +4252,8 @@ func TestContext2Apply_Provisioner_compute(t *testing.T) {
|
|||
p.ApplyFn = testApplyFn
|
||||
p.DiffFn = testDiffFn
|
||||
pr.ApplyFn = func(rs *InstanceState, c *ResourceConfig) error {
|
||||
val, ok := c.Config["foo"]
|
||||
if !ok || val != "computed_dynamical" {
|
||||
val, ok := c.Config["command"]
|
||||
if !ok || val != "computed_value" {
|
||||
t.Fatalf("bad value for foo: %v %#v", val, c)
|
||||
}
|
||||
|
||||
|
@ -4825,7 +4825,7 @@ func TestContext2Apply_provisionerDestroy(t *testing.T) {
|
|||
p.ApplyFn = testApplyFn
|
||||
p.DiffFn = testDiffFn
|
||||
pr.ApplyFn = func(rs *InstanceState, c *ResourceConfig) error {
|
||||
val, ok := c.Config["foo"]
|
||||
val, ok := c.Config["command"]
|
||||
if !ok || val != "destroy" {
|
||||
t.Fatalf("bad value for foo: %v %#v", val, c)
|
||||
}
|
||||
|
@ -4953,7 +4953,7 @@ func TestContext2Apply_provisionerDestroyFailContinue(t *testing.T) {
|
|||
var l sync.Mutex
|
||||
var calls []string
|
||||
pr.ApplyFn = func(rs *InstanceState, c *ResourceConfig) error {
|
||||
val, ok := c.Config["foo"]
|
||||
val, ok := c.Config["command"]
|
||||
if !ok {
|
||||
t.Fatalf("bad value for foo: %v %#v", val, c)
|
||||
}
|
||||
|
@ -5029,7 +5029,7 @@ func TestContext2Apply_provisionerDestroyFailContinueFail(t *testing.T) {
|
|||
var l sync.Mutex
|
||||
var calls []string
|
||||
pr.ApplyFn = func(rs *InstanceState, c *ResourceConfig) error {
|
||||
val, ok := c.Config["foo"]
|
||||
val, ok := c.Config["command"]
|
||||
if !ok {
|
||||
t.Fatalf("bad value for foo: %v %#v", val, c)
|
||||
}
|
||||
|
@ -5111,9 +5111,9 @@ func TestContext2Apply_provisionerDestroyTainted(t *testing.T) {
|
|||
return nil
|
||||
}
|
||||
|
||||
val, ok := c.Config["foo"]
|
||||
val, ok := c.Config["command"]
|
||||
if !ok || val != expected {
|
||||
t.Fatalf("bad value for foo: %v %#v", val, c)
|
||||
t.Fatalf("bad value for command: %v %#v", val, c)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -350,7 +350,7 @@ aws_secret_key = ZZZZ
|
|||
|
||||
const testTerraformApplyDependsCreateBeforeStr = `
|
||||
aws_instance.lb:
|
||||
ID = foo
|
||||
ID = baz
|
||||
provider = provider.aws
|
||||
instance = foo
|
||||
type = aws_instance
|
||||
|
|
|
@ -2,12 +2,12 @@ variable "value" {}
|
|||
|
||||
resource "aws_instance" "foo" {
|
||||
num = "2"
|
||||
compute = "dynamical"
|
||||
compute = "value"
|
||||
compute_value = "${var.value}"
|
||||
}
|
||||
|
||||
resource "aws_instance" "bar" {
|
||||
provisioner "shell" {
|
||||
foo = "${aws_instance.foo.dynamical}"
|
||||
command = "${aws_instance.foo.value}"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@ resource "aws_instance" "foo" {
|
|||
foo = "bar"
|
||||
|
||||
provisioner "shell" {
|
||||
foo = "one"
|
||||
command = "one"
|
||||
when = "destroy"
|
||||
on_failure = "continue"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
foo = "two"
|
||||
command = "two"
|
||||
when = "destroy"
|
||||
on_failure = "continue"
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@ resource "aws_instance" "foo" {
|
|||
foo = "bar"
|
||||
|
||||
provisioner "shell" {
|
||||
foo = "one"
|
||||
command = "one"
|
||||
when = "destroy"
|
||||
on_failure = "continue"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
foo = "two"
|
||||
command = "two"
|
||||
when = "destroy"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@ resource "aws_instance" "foo" {
|
|||
foo = "bar"
|
||||
|
||||
provisioner "shell" {
|
||||
foo = "create"
|
||||
command = "create"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
foo = "destroy"
|
||||
command = "destroy"
|
||||
when = "destroy"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue