mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-09 18:00:40 +00:00
add additional tfvalidate tests
This commit is contained in:
parent
839bd22410
commit
2d6f1b5b9e
@ -107,12 +107,28 @@ func TestPlugin(t *testing.T) {
|
|||||||
|
|
||||||
g.Describe("tfValidate", func() {
|
g.Describe("tfValidate", func() {
|
||||||
g.It("Should return correct validate command", func() {
|
g.It("Should return correct validate command", func() {
|
||||||
|
type args struct {
|
||||||
|
config Config
|
||||||
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
|
args args
|
||||||
want *exec.Cmd
|
want *exec.Cmd
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
"default",
|
"default",
|
||||||
|
args{config: Config{VarFiles: []string{"common.tfvars", "prod.tfvars"}}},
|
||||||
|
exec.Command("terraform", "validate"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"with no vars",
|
||||||
|
args{config: Config{Vars: map[string]string{"var1": "value1", "var2": "value2"}}},
|
||||||
|
exec.Command("terraform", "validate"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"with no var-files",
|
||||||
|
args{config: Config{VarFiles: []string{"common.tfvars", "prod.tfvars"}}},
|
||||||
exec.Command("terraform", "validate"),
|
exec.Command("terraform", "validate"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user