@@ -17,7 +17,6 @@ limitations under the License.
17
17
package integration
18
18
19
19
import (
20
- "os"
21
20
"testing"
22
21
23
22
"github.com/GoogleContainerTools/skaffold/integration/skaffold"
@@ -36,7 +35,7 @@ func TestRun(t *testing.T) {
36
35
deployments []string
37
36
pods []string
38
37
env []string
39
- remoteOnly bool
38
+ gcpOnly bool
40
39
}{
41
40
{
42
41
description : "getting-started" ,
@@ -67,38 +66,38 @@ func TestRun(t *testing.T) {
67
66
description : "Google Cloud Build" ,
68
67
dir : "examples/google-cloud-build" ,
69
68
pods : []string {"getting-started" },
70
- remoteOnly : true ,
69
+ gcpOnly : true ,
71
70
}, {
72
71
description : "Google Cloud Build with sub folder" ,
73
72
dir : "testdata/gcb-sub-folder" ,
74
73
pods : []string {"getting-started" },
75
- remoteOnly : true ,
74
+ gcpOnly : true ,
76
75
}, {
77
76
description : "kaniko" ,
78
77
dir : "examples/kaniko" ,
79
78
pods : []string {"getting-started-kaniko" },
80
- remoteOnly : true ,
79
+ gcpOnly : true ,
81
80
}, {
82
81
description : "kaniko local" ,
83
82
dir : "examples/kaniko-local" ,
84
83
pods : []string {"getting-started-kaniko" },
85
- remoteOnly : true ,
84
+ gcpOnly : true ,
86
85
}, {
87
86
description : "kaniko local with sub folder" ,
88
87
dir : "testdata/kaniko-sub-folder" ,
89
88
pods : []string {"getting-started-kaniko" },
90
- remoteOnly : true ,
89
+ gcpOnly : true ,
91
90
}, {
92
91
description : "kaniko microservices" ,
93
92
dir : "testdata/kaniko-microservices" ,
94
93
deployments : []string {"leeroy-app" , "leeroy-web" },
95
- remoteOnly : true ,
94
+ gcpOnly : true ,
96
95
}, {
97
96
description : "jib in googlecloudbuild" ,
98
97
dir : "testdata/jib" ,
99
98
args : []string {"-p" , "gcb" },
100
99
deployments : []string {"web" },
101
- remoteOnly : true ,
100
+ gcpOnly : true ,
102
101
}, {
103
102
description : "custom builder" ,
104
103
dir : "testdata/custom" ,
@@ -107,8 +106,11 @@ func TestRun(t *testing.T) {
107
106
}
108
107
for _ , test := range tests {
109
108
t .Run (test .description , func (t * testing.T ) {
110
- if test .remoteOnly && os .Getenv ("REMOTE_INTEGRATION" ) != "true" {
111
- t .Skip ("skipping remote only test" )
109
+ if test .gcpOnly && ! ShouldRunGCPOnlyTests () {
110
+ t .Skip ("skipping gcp only test" )
111
+ }
112
+ if ! test .gcpOnly && ShouldRunGCPOnlyTests () {
113
+ t .Skip ("skipping test that is not gcp only" )
112
114
}
113
115
114
116
ns , client , deleteNs := SetupNamespace (t )
0 commit comments