@@ -13,7 +13,6 @@ import (
1313 "testing"
1414
1515 "github.com/google/go-cmp/cmp"
16- "github.com/hashicorp/terraform-plugin-testing/actioncheck"
1716 "github.com/hashicorp/terraform-plugin-testing/config"
1817 "github.com/hashicorp/terraform-plugin-testing/helper/resource"
1918 "github.com/hashicorp/terraform-plugin-testing/tfversion"
@@ -46,10 +45,12 @@ func TestLocalCommandAction_bash(t *testing.T) {
4645 "scripts_folder_path" : config .StringVariable (testScriptsDir ),
4746 },
4847 ConfigDirectory : config .StaticDirectory (bashTestDirectory ),
49- ActionChecks : []actioncheck.ActionCheck {
50- actioncheck .ExpectProgressCount ("local_command" , 1 ),
51- actioncheck .ExpectProgressMessageContains ("local_command" , "Hello !" ),
52- },
48+ // TODO: Currently action checks don't exist, but eventually we can run these on the progress messages
49+ // https://github.com/hashicorp/terraform-plugin-testing/pull/570
50+ // ActionChecks: []actioncheck.ActionCheck{
51+ // actioncheck.ExpectProgressCount("local_command", 1),
52+ // actioncheck.ExpectProgressMessageContains("local_command", "Hello !"),
53+ // },
5354 PostApplyFunc : assertTestFile (t , filepath .Join (tempDir , "test_file.txt" ), expectedFileContent ),
5455 },
5556 },
@@ -81,10 +82,12 @@ func TestLocalCommandAction_bash_stdin(t *testing.T) {
8182 "scripts_folder_path" : config .StringVariable (testScriptsDir ),
8283 },
8384 ConfigDirectory : config .StaticDirectory (bashTestDirectory ),
84- ActionChecks : []actioncheck.ActionCheck {
85- actioncheck .ExpectProgressCount ("local_command" , 1 ),
86- actioncheck .ExpectProgressMessageContains ("local_command" , fmt .Sprintf ("Hello %s!" , stdin )),
87- },
85+ // TODO: Currently action checks don't exist, but eventually we can run these on the progress messages
86+ // https://github.com/hashicorp/terraform-plugin-testing/pull/570
87+ // ActionChecks: []actioncheck.ActionCheck{
88+ // actioncheck.ExpectProgressCount("local_command", 1),
89+ // actioncheck.ExpectProgressMessageContains("local_command", fmt.Sprintf("Hello %s!", stdin)),
90+ // },
8891 PostApplyFunc : assertTestFile (t , filepath .Join (tempDir , "test_file.txt" ), expectedFileContent ),
8992 },
9093 },
@@ -124,10 +127,12 @@ func TestLocalCommandAction_bash_all(t *testing.T) {
124127 ),
125128 },
126129 ConfigDirectory : config .StaticDirectory (bashTestDirectory ),
127- ActionChecks : []actioncheck.ActionCheck {
128- actioncheck .ExpectProgressCount ("local_command" , 1 ),
129- actioncheck .ExpectProgressMessageContains ("local_command" , fmt .Sprintf ("Hello %s!" , stdin )),
130- },
130+ // TODO: Currently action checks don't exist, but eventually we can run these on the progress messages
131+ // https://github.com/hashicorp/terraform-plugin-testing/pull/570
132+ // ActionChecks: []actioncheck.ActionCheck{
133+ // actioncheck.ExpectProgressCount("local_command", 1),
134+ // actioncheck.ExpectProgressMessageContains("local_command", fmt.Sprintf("Hello %s!", stdin)),
135+ // },
131136 PostApplyFunc : assertTestFile (t , filepath .Join (tempDir , "test_file.txt" ), expectedFileContent ),
132137 },
133138 },
@@ -165,10 +170,12 @@ func TestLocalCommandAction_bash_null_args(t *testing.T) {
165170 ),
166171 },
167172 ConfigDirectory : config .TestNameDirectory (),
168- ActionChecks : []actioncheck.ActionCheck {
169- actioncheck .ExpectProgressCount ("local_command" , 1 ),
170- actioncheck .ExpectProgressMessageContains ("local_command" , "Hello !" ),
171- },
173+ // TODO: Currently action checks don't exist, but eventually we can run these on the progress messages
174+ // https://github.com/hashicorp/terraform-plugin-testing/pull/570
175+ // ActionChecks: []actioncheck.ActionCheck{
176+ // actioncheck.ExpectProgressCount("local_command", 1),
177+ // actioncheck.ExpectProgressMessageContains("local_command", "Hello !"),
178+ // },
172179 PostApplyFunc : assertTestFile (t , filepath .Join (tempDir , "test_file.txt" ), expectedFileContent ),
173180 },
174181 },
@@ -204,10 +211,12 @@ func TestLocalCommandAction_absolute_path_bash(t *testing.T) {
204211 "scripts_folder_path" : config .StringVariable (testScriptsDir ),
205212 },
206213 ConfigDirectory : config .StaticDirectory (bashTestDirectory ),
207- ActionChecks : []actioncheck.ActionCheck {
208- actioncheck .ExpectProgressCount ("local_command" , 1 ),
209- actioncheck .ExpectProgressMessageContains ("local_command" , "Hello !" ),
210- },
214+ // TODO: Currently action checks don't exist, but eventually we can run these on the progress messages
215+ // https://github.com/hashicorp/terraform-plugin-testing/pull/570
216+ // ActionChecks: []actioncheck.ActionCheck{
217+ // actioncheck.ExpectProgressCount("local_command", 1),
218+ // actioncheck.ExpectProgressMessageContains("local_command", "Hello !"),
219+ // },
211220 PostApplyFunc : assertTestFile (t , filepath .Join (tempDir , "test_file.txt" ), expectedFileContent ),
212221 },
213222 },
0 commit comments