|
@ -43,16 +43,16 @@ func TestPlugin(t *testing.T) { |
|
|
args{config: Config{}}, |
|
|
args{config: Config{}}, |
|
|
exec.Command("terraform", "apply", "plan.tfout"), |
|
|
exec.Command("terraform", "apply", "plan.tfout"), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
"with targets", |
|
|
|
|
|
args{config: Config{Targets: []string{"target1", "target2"}}}, |
|
|
|
|
|
exec.Command("terraform", "apply", "--target", "target1", "--target", "target2", "plan.tfout"), |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
{ |
|
|
"with parallelism", |
|
|
"with parallelism", |
|
|
args{config: Config{Parallelism: 5}}, |
|
|
args{config: Config{Parallelism: 5}}, |
|
|
exec.Command("terraform", "apply", "-parallelism=5", "plan.tfout"), |
|
|
exec.Command("terraform", "apply", "-parallelism=5", "plan.tfout"), |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"with targets", |
|
|
|
|
|
args{config: Config{Targets: []string{"target1", "target2"}}}, |
|
|
|
|
|
exec.Command("terraform", "apply", "--target", "target1", "--target", "target2", "plan.tfout"), |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for _, tt := range tests { |
|
|
for _, tt := range tests { |
|
@ -77,16 +77,16 @@ func TestPlugin(t *testing.T) { |
|
|
args{config: Config{}}, |
|
|
args{config: Config{}}, |
|
|
exec.Command("terraform", "destroy", "-force"), |
|
|
exec.Command("terraform", "destroy", "-force"), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
"with targets", |
|
|
|
|
|
args{config: Config{Targets: []string{"target1", "target2"}}}, |
|
|
|
|
|
exec.Command("terraform", "destroy", "-target=target1", "-target=target2", "-force"), |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
{ |
|
|
"with parallelism", |
|
|
"with parallelism", |
|
|
args{config: Config{Parallelism: 5}}, |
|
|
args{config: Config{Parallelism: 5}}, |
|
|
exec.Command("terraform", "destroy", "-parallelism=5", "-force"), |
|
|
exec.Command("terraform", "destroy", "-parallelism=5", "-force"), |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"with targets", |
|
|
|
|
|
args{config: Config{Targets: []string{"target1", "target2"}}}, |
|
|
|
|
|
exec.Command("terraform", "destroy", "-target=target1", "-target=target2", "-force"), |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for _, tt := range tests { |
|
|
for _, tt := range tests { |
|
|