Skip to content

Commit 3db0ef8

Browse files
committed
Disable interactive
Signed-off-by: Neo2308 <[email protected]>
1 parent 39481bd commit 3db0ef8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

internal/testutils/olm.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,20 @@ func (tc TestContext) AddPackagemanifestsTarget(operatorType projutil.OperatorTy
7373
return nil
7474
}
7575

76+
// DisableManifestsInteractiveMode will update the Makefile to disable the interactive mode
77+
func (tc TestContext) DisableManifestsInteractiveMode() error {
78+
// Todo: check if we cannot improve it since the replace/content will exists in the
79+
// pkgmanifest target if it be scaffolded before this call
80+
content := "$(OPERATOR_SDK) generate kustomize manifests"
81+
replace := content + " --interactive=false"
82+
return ReplaceInFile(filepath.Join(tc.Dir, "Makefile"), content, replace)
83+
}
84+
7685
// GenerateBundle runs all commands to create an operator bundle.
7786
func (tc TestContext) GenerateBundle() error {
87+
if err := tc.DisableManifestsInteractiveMode(); err != nil {
88+
return err
89+
}
90+
7891
return tc.Make("bundle", "IMG="+tc.ImageName)
7992
}

0 commit comments

Comments
 (0)