@@ -1148,77 +1148,6 @@ func TestHelmDependencies(t *testing.T) {
1148
1148
}
1149
1149
}
1150
1150
1151
- func TestImageSetFromConfig (t * testing.T ) {
1152
- tests := []struct {
1153
- description string
1154
- valueName string
1155
- tag string
1156
- expected string
1157
- strategy * latest.HelmConventionConfig
1158
- shouldErr bool
1159
- }{
1160
- {
1161
- description : "Helm set values with no convention config" ,
1162
- valueName : "image" ,
1163
- tag : "skaffold-helm:1.0.0" ,
1164
- expected : "image=skaffold-helm:1.0.0" ,
1165
- strategy : nil ,
1166
- shouldErr : false ,
1167
- },
1168
- {
1169
- description : "Helm set values with helm conventions" ,
1170
- valueName : "image" ,
1171
- tag : "skaffold-helm:1.0.0" ,
1172
- expected : "image.repository=skaffold-helm,image.tag=1.0.0" ,
1173
- strategy : & latest.HelmConventionConfig {},
1174
- shouldErr : false ,
1175
- },
1176
- {
1177
- description : "Helm set values with helm conventions and explicit registry value" ,
1178
- valueName : "image" ,
1179
- tag : "docker.io/skaffold-helm:1.0.0" ,
1180
- expected : "image.registry=docker.io,image.repository=skaffold-helm,image.tag=1.0.0" ,
1181
- strategy : & latest.HelmConventionConfig {
1182
- ExplicitRegistry : true ,
1183
- },
1184
- shouldErr : false ,
1185
- },
1186
- {
1187
- description : "Invalid tag with helm conventions" ,
1188
- valueName : "image" ,
1189
- tag : "skaffold-helm:1.0.0,0" ,
1190
- expected : "" ,
1191
- strategy : & latest.HelmConventionConfig {},
1192
- shouldErr : true ,
1193
- },
1194
- {
1195
- description : "Helm set values with helm conventions and explicit registry value, but missing in tag" ,
1196
- valueName : "image" ,
1197
- tag : "skaffold-helm:1.0.0" ,
1198
- expected : "" ,
1199
- strategy : & latest.HelmConventionConfig {
1200
- ExplicitRegistry : true ,
1201
- },
1202
- shouldErr : true ,
1203
- },
1204
- {
1205
- description : "Helm set values using digest" ,
1206
- valueName : "image" ,
1207
- tag : "skaffold-helm:stable@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2" ,
1208
- expected : "image.repository=skaffold-helm,image.tag=stable@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2" ,
1209
- strategy : & latest.HelmConventionConfig {},
1210
- shouldErr : false ,
1211
- },
1212
- }
1213
- for _ , test := range tests {
1214
- testutil .Run (t , test .description , func (t * testutil.T ) {
1215
- values , err := imageSetFromConfig (test .strategy , test .valueName , test .tag )
1216
- t .CheckError (test .shouldErr , err )
1217
- t .CheckDeepEqual (test .expected , values )
1218
- })
1219
- }
1220
- }
1221
-
1222
1151
func TestHelmRender (t * testing.T ) {
1223
1152
tests := []struct {
1224
1153
description string
0 commit comments