mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-05 09:38:50 +00:00
Add test for create secret
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
parent
48e89b95bb
commit
67b393ce09
17 changed files with 491 additions and 3 deletions
|
|
@ -311,6 +311,7 @@ func executeTemplate(content string, templateValues map[string]string) (string,
|
|||
|
||||
// Run the command and return the captured output.
|
||||
func executeCommand(cmd string) (string, error) {
|
||||
defer resetCmdArgs()
|
||||
args, err := shellwords.Parse(cmd)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
@ -329,3 +330,9 @@ func executeCommand(cmd string) (string, error) {
|
|||
|
||||
return result, err
|
||||
}
|
||||
|
||||
func resetCmdArgs() {
|
||||
createArgs = createFlags{}
|
||||
getArgs = GetFlags{}
|
||||
secretGitArgs = NewSecretGitFlags()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue