@@ -76,11 +76,10 @@ func TestInvokes(t *testing.T) {
7676 testInvokeKind (t , tmpConfigFile , * workingDir )
7777 })
7878
79- // TODO(ACIX-1078): Fix the flaky test and re-enable it
80- // t.Run("invoke-kind-operator", func(t *testing.T) {
81- // t.Parallel()
82- // testInvokeKindOperator(t, tmpConfigFile, *workingDir)
83- // })
79+ t .Run ("invoke-kind-operator" , func (t * testing.T ) {
80+ t .Parallel ()
81+ testInvokeKindOperator (t , tmpConfigFile , * workingDir )
82+ })
8483}
8584
8685func testAzureInvokeVM (t * testing.T , tmpConfigFile string , workingDirectory string ) {
@@ -158,7 +157,7 @@ func testInvokeDockerVM(t *testing.T, tmpConfigFile string, workingDirectory str
158157 stdErr .Reset ()
159158
160159 t .Log ("destroying vm with docker" )
161- destroyCmd := exec .Command ("invoke" , "destroy-docker" , "--stack-name" , stackName , "--config-path" , tmpConfigFile )
160+ destroyCmd := exec .Command ("invoke" , "aws. destroy-docker" , "--stack-name" , stackName , "--config-path" , tmpConfigFile )
162161 destroyCmd .Dir = workingDirectory
163162 destroyCmd .Stdout = & stdOut
164163 destroyCmd .Stderr = & stdErr
@@ -175,37 +174,37 @@ func testInvokeKind(t *testing.T, tmpConfigFile string, workingDirectory string)
175174 stackName := strings .Join (stackParts , "-" )
176175 stackName = sanitizeStackName (stackName )
177176 t .Log ("creating kind cluster" )
178- createCmd := exec .Command ("invoke" , "create-kind" , "--no-interactive" , "--stack-name" , stackName , "--config-path" , tmpConfigFile , "--use-fakeintake" , "--use-loadBalancer" )
177+ createCmd := exec .Command ("invoke" , "aws. create-kind" , "--no-interactive" , "--stack-name" , stackName , "--config-path" , tmpConfigFile , "--use-fakeintake" , "--use-loadBalancer" )
179178 createCmd .Dir = workingDirectory
180179 createOutput , err := createCmd .Output ()
181180 assert .NoError (t , err , "Error found creating kind cluster: %s" , string (createOutput ))
182181
183182 t .Log ("destroying kind cluster" )
184- destroyCmd := exec .Command ("invoke" , "destroy-kind" , "--stack-name" , stackName , "--config-path" , tmpConfigFile )
183+ destroyCmd := exec .Command ("invoke" , "aws. destroy-kind" , "--stack-name" , stackName , "--config-path" , tmpConfigFile )
185184 destroyCmd .Dir = workingDirectory
186185 destroyOutput , err := destroyCmd .Output ()
187186 require .NoError (t , err , "Error found destroying kind cluster: %s" , string (destroyOutput ))
188187}
189188
190- // func testInvokeKindOperator(t *testing.T, tmpConfigFile string, workingDirectory string) {
191- // t.Helper()
192- // stackName := "invoke-kind-with-operator"
193- // if os.Getenv("CI") == "true" {
194- // stackName = fmt.Sprintf("%s-%s", stackName, os.Getenv("CI_JOB_ID"))
195- // }
196- // stackName = sanitizeStackName(stackName)
197- // t.Log("creating kind cluster with operator")
198- // createCmd := exec.Command("invoke", "aws.create-kind", "--install-agent-with-operator", "true", "--no-interactive", "--stack-name", stackName, "--config-path", tmpConfigFile, "--use-fakeintake", "--use-loadBalancer")
199- // createCmd.Dir = workingDirectory
200- // createOutput, err := createCmd.Output()
201- // assert.NoError(t, err, "Error found creating kind cluster: %s; %s", string(createOutput), err)
202-
203- // t.Log("destroying kind cluster with operator")
204- // destroyCmd := exec.Command("invoke", "destroy-kind", "--stack-name", stackName, "--config-path", tmpConfigFile)
205- // destroyCmd.Dir = workingDirectory
206- // destroyOutput, err := destroyCmd.Output()
207- // require.NoError(t, err, "Error found destroying kind cluster: %s", string(destroyOutput))
208- // }
189+ func testInvokeKindOperator (t * testing.T , tmpConfigFile string , workingDirectory string ) {
190+ t .Helper ()
191+ stackName := "invoke-kind-with-operator"
192+ if os .Getenv ("CI" ) == "true" {
193+ stackName = fmt .Sprintf ("%s-%s" , stackName , os .Getenv ("CI_JOB_ID" ))
194+ }
195+ stackName = sanitizeStackName (stackName )
196+ t .Log ("creating kind cluster with operator" )
197+ createCmd := exec .Command ("invoke" , "aws.create-kind" , "--install-agent-with-operator" , "true" , "--no-interactive" , "--stack-name" , stackName , "--config-path" , tmpConfigFile , "--use-fakeintake" , "--use-loadBalancer" )
198+ createCmd .Dir = workingDirectory
199+ createOutput , err := createCmd .Output ()
200+ assert .NoError (t , err , "Error found creating kind cluster: %s; %s" , string (createOutput ), err )
201+
202+ t .Log ("destroying kind cluster with operator" )
203+ destroyCmd := exec .Command ("invoke" , "aws. destroy-kind" , "--stack-name" , stackName , "--config-path" , tmpConfigFile )
204+ destroyCmd .Dir = workingDirectory
205+ destroyOutput , err := destroyCmd .Output ()
206+ require .NoError (t , err , "Error found destroying kind cluster: %s" , string (destroyOutput ))
207+ }
209208
210209//go:embed testfixture/config.yaml
211210var testInfraTestConfig string
0 commit comments