forked from fluxcd/flux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into Garbage-collectio…
…n-dry-run-fluxcd#1990
- Loading branch information
Showing
4 changed files
with
42 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -316,7 +316,7 @@ func TestTraceGitCommand(t *testing.T) { | |
dir: "/tmp/flux-working628880789", | ||
}, | ||
}, | ||
expected: `TRACE: command="git clone --branch master /tmp/flux-gitclone239583443 /tmp/flux-working628880789" out="" err="" dir="/tmp/flux-working628880789" env=""`, | ||
expected: `TRACE: command="git clone --branch master /tmp/flux-gitclone239583443 /tmp/flux-working628880789" out="" dir="/tmp/flux-working628880789" env=""`, | ||
}, | ||
{ | ||
name: "git rev-list", | ||
|
@@ -333,7 +333,7 @@ func TestTraceGitCommand(t *testing.T) { | |
dir: "/tmp/flux-gitclone239583443", | ||
}, | ||
}, | ||
expected: `TRACE: command="git rev-list --max-count 1 flux-sync --" out="b9d6a543acf8085ff6bed23fac17f8dc71bfcb66" err="" dir="/tmp/flux-gitclone239583443" env=""`, | ||
expected: `TRACE: command="git rev-list --max-count 1 flux-sync --" out="b9d6a543acf8085ff6bed23fac17f8dc71bfcb66" dir="/tmp/flux-gitclone239583443" env=""`, | ||
}, | ||
{ | ||
name: "git config email", | ||
|
@@ -347,7 +347,7 @@ func TestTraceGitCommand(t *testing.T) { | |
dir: "/tmp/flux-working056923691", | ||
}, | ||
}, | ||
expected: `TRACE: command="git config user.email [email protected]" out="" err="" dir="/tmp/flux-working056923691" env=""`, | ||
expected: `TRACE: command="git config user.email [email protected]" out="" dir="/tmp/flux-working056923691" env=""`, | ||
}, | ||
{ | ||
name: "git notes", | ||
|
@@ -363,15 +363,14 @@ func TestTraceGitCommand(t *testing.T) { | |
}, | ||
out: "refs/notes/flux", | ||
}, | ||
expected: `TRACE: command="git notes --ref flux get-ref" out="refs/notes/flux" err="" dir="/tmp/flux-working647148942" env=""`, | ||
expected: `TRACE: command="git notes --ref flux get-ref" out="refs/notes/flux" dir="/tmp/flux-working647148942" env=""`, | ||
}, | ||
} | ||
for _, example := range examples { | ||
actual := traceGitCommand( | ||
example.input.args, | ||
example.input.config, | ||
example.input.out, | ||
example.input.err, | ||
) | ||
assert.Equal(t, example.expected, actual) | ||
} | ||
|