Skip to content

Commit

Permalink
fix TestMergeExpose
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Oct 12, 2023
1 parent fb57559 commit b3785d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions loader/merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1468,11 +1468,6 @@ services:
Scale: 1,
},
},
Networks: types.Networks{},
Volumes: types.Volumes{},
Secrets: types.Secrets{},
Configs: types.Configs{},
Extensions: types.Extensions{},
Environment: map[string]string{consts.ComposeProjectName: "test"},
}, config)
}
5 changes: 5 additions & 0 deletions override/uncity.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ var unique = map[tree.Path]indexer{}
func init() {
unique["services.*.environment"] = environmentIndexer
unique["services.*.volumes"] = volumeIndexer
unique["services.*.expose"] = exposeIndexer
}

// EnforceUnicity removes redefinition of elements declared in a sequence
Expand Down Expand Up @@ -104,3 +105,7 @@ func volumeIndexer(y any, p tree.Path) (string, error) {
}
return "", nil
}

func exposeIndexer(a any, path tree.Path) (string, error) {
return a.(string), nil
}

0 comments on commit b3785d0

Please sign in to comment.