@@ -28,8 +28,8 @@ func TestAWSSingleCluster(t *testing.T) {
2828 }
2929
3030 defer func () {
31- t .Log ("run cluster destroy command" )
32- c = ti .Command ("cluster " , "destroy" )
31+ t .Log ("run environment destroy command" )
32+ c = ti .Command ("environment " , "destroy" , "--name" , ti . environmentName , "--auto-approve " )
3333 // write error out to my stdout
3434 c .Stderr = os .Stderr
3535 if err := c .Run (); err != nil {
@@ -75,8 +75,8 @@ func TestAWSMultiCluster(t *testing.T) {
7575 }
7676
7777 defer func () {
78- t .Log ("run hub destroy command" )
79- c = ti .Command ("--current-cluster " , fmt . Sprintf ( "%s-hub " , ti .environmentName ) , "cluster" , "destroy " )
78+ t .Log ("run environment destroy command" )
79+ c = ti .Command ("environment " , "destroy" , "--name " , ti .environmentName , "--auto-approve " )
8080 // write error out to my stdout
8181 c .Stderr = os .Stderr
8282 if err := c .Run (); err != nil {
@@ -91,15 +91,6 @@ func TestAWSMultiCluster(t *testing.T) {
9191 t .Fatalf ("unexpected error: %+v" , err )
9292 }
9393
94- defer func () {
95- t .Log ("run cluster destroy command" )
96- c = ti .Command ("cluster" , "destroy" )
97- // write error out to my stdout
98- c .Stderr = os .Stderr
99- if err := c .Run (); err != nil {
100- t .Errorf ("unexpected error: %+v" , err )
101- }
102- }()
10394 t .Log ("run cluster apply command" )
10495 c = ti .Command ("cluster" , "apply" )
10596 // write error out to my stdout
0 commit comments