Skip to content

Commit 73ea6e2

Browse files
committed
commands/.../build.go: shorten code a bit
We don't need to do any extra operations anymore if a user does not supply a namespaced manifest path, so we can just use a default string
1 parent 2441947 commit 73ea6e2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

commands/operator-sdk/cmd/build.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For example:
5656
}
5757
buildCmd.Flags().BoolVarP(&enableTests, "enable-tests", "e", false, "Enable in-cluster testing by adding test binary to the image")
5858
buildCmd.Flags().StringVarP(&testLocationBuild, "test-location", "t", "./test/e2e", "Location of tests")
59-
buildCmd.Flags().StringVarP(&namespacedManBuild, "namespaced", "n", "", "Path of namespaced resources for tests")
59+
buildCmd.Flags().StringVarP(&namespacedManBuild, "namespaced", "n", "deploy/operator.yaml", "Path of namespaced resources for tests")
6060
return buildCmd
6161
}
6262

@@ -103,9 +103,6 @@ func verifyDeploymentImage(yamlFile []byte, imageName string) string {
103103
}
104104

105105
func renderTestManifest(image string) string {
106-
if namespacedManBuild == "" {
107-
namespacedManBuild = "deploy/operator.yaml"
108-
}
109106
namespacedBytes, err := ioutil.ReadFile(namespacedManBuild)
110107
if err != nil {
111108
log.Fatalf("could not read rbac manifest: %v", err)

0 commit comments

Comments
 (0)