@@ -17,6 +17,7 @@ limitations under the License.
17
17
package integration
18
18
19
19
import (
20
+ "fmt"
20
21
"testing"
21
22
22
23
"github.com/GoogleContainerTools/skaffold/integration/skaffold"
@@ -79,22 +80,24 @@ func TestRenderApplyHelmDeployment(t *testing.T) {
79
80
// Ensure that an intentionally broken deployment fails the status check in `skaffold apply`.
80
81
func TestApplyStatusCheckFailure (t * testing.T ) {
81
82
tests := []struct {
82
- description string
83
- manifestFile string
83
+ description string
84
+ profile string
84
85
}{
85
86
{
86
- description : "status check for deployment resources" ,
87
- manifestFile : "deployment.yaml " ,
87
+ description : "status check for deployment resources" ,
88
+ profile : "deployment" ,
88
89
},
89
90
{
90
- description : "status check for statefulset resources" ,
91
- manifestFile : "statefulset.yaml " ,
91
+ description : "status check for statefulset resources" ,
92
+ profile : "statefulset" ,
92
93
},
93
94
}
94
95
for _ , test := range tests {
95
96
testutil .Run (t , test .description , func (t * testutil.T ) {
96
- err := skaffold .Apply (test .manifestFile ).InDir ("testdata/apply" ).Run (t .T )
97
- skaffold .Delete ()
97
+ MarkIntegrationTest (t .T , NeedsGcp )
98
+ ns , _ := SetupNamespace (t .T )
99
+ defer skaffold .Delete ("-p" , test .profile ).InDir ("testdata/apply" ).InNs (ns .Name ).Run (t .T )
100
+ err := skaffold .Apply (fmt .Sprintf ("%s.yaml" , test .profile )).InDir ("testdata/apply" ).InNs (ns .Name ).Run (t .T )
98
101
t .CheckError (true , err )
99
102
})
100
103
}
0 commit comments