Skip to content

Commit

Permalink
Removed scenario testing missing target repo prefix.
Browse files Browse the repository at this point in the history
FIxed linter errors.
  • Loading branch information
dekiel committed Sep 18, 2024
1 parent 2e077dd commit c97cf4b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions cmd/image-syncer/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,10 @@ var _ = Describe("getTarget", func() {

var _ = Describe("parseImagesFile", func() {
validYAML := `
targetRepoPrefix: "external/prod/"
images:
- source: "cypress/included:9.5.0"
target: "external/prod/cypress/included:latest"
`
missingTargetRepoPrefixYAML := `
images:
- source: "cypress/included:9.5.0"
target: "external/prod/cypress/included:latest"
`

tests := []struct {
name string
content string
Expand All @@ -103,12 +96,6 @@ images:
content: validYAML,
shouldErr: false,
},
{
name: "missing targetRepoPrefix",
content: missingTargetRepoPrefixYAML,
shouldErr: true,
expectedErr: "targetRepoPrefix can not be empty",
},
}

for _, test := range tests {
Expand Down
2 changes: 1 addition & 1 deletion pkg/image-url-helper/promote/externalsyncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func PrintExternalSyncerYaml(images common.ComponentImageMap, targetContainerReg
}

// convertImageslist takes in a list of images, target repository & tag and creates a SyncDef structure that can be later marshalled and used by the image-syncer tool
func convertImageslist(images common.ComponentImageMap, targetContainerRegistry, targetTag string) imagesyncer.SyncDef {
func convertImageslist(images common.ComponentImageMap, targetTag string) imagesyncer.SyncDef {

imageNames := make([]string, 0)
for _, image := range images {
Expand Down

0 comments on commit c97cf4b

Please sign in to comment.