-
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.
- Loading branch information
Tomasz Gągor
committed
Jan 15, 2025
1 parent
5d65a65
commit 236b1d7
Showing
1 changed file
with
25 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,9 @@ func TestCase1(t *testing.T) { | |
|
||
out, err := shell.RunCommandAndGetOutputE(t, cmd) | ||
assert.Nil(t, err) | ||
assert.Regexp(t, "Building.*image=test-case-1", out) | ||
// no --build flag in test | ||
assert.NotNil(t, out) | ||
// assert.Regexp(t, "Building.*image=test-case-1", out) | ||
|
||
// command should not fail | ||
code, err := shell.GetExitCodeForRunCommandError(err) | ||
|
@@ -106,8 +108,10 @@ func TestCase2(t *testing.T) { | |
|
||
out, err := shell.RunCommandAndGetOutputE(t, cmd) | ||
assert.Nil(t, err) | ||
assert.Regexp(t, "Building.*image=test-case-2", out) | ||
assert.Regexp(t, "Building.*image=test-case-2b", out) | ||
// no --build flag | ||
assert.NotNil(t, out) | ||
// assert.Regexp(t, "Building.*image=test-case-2", out) | ||
// assert.Regexp(t, "Building.*image=test-case-2b", out) | ||
|
||
// not all of them match but should | ||
assert.Contains(t, out, "\"maintainer\":\"Tomasz Gągor <[email protected]>\"") | ||
|
@@ -166,7 +170,9 @@ func TestCase4(t *testing.T) { | |
|
||
out, err := shell.RunCommandAndGetOutputE(t, cmd) | ||
assert.Nil(t, err) | ||
assert.Regexp(t, "Building.*image=test-case-4", out) | ||
// no --build flag | ||
assert.NotNil(t, out) | ||
// assert.Regexp(t, "Building.*image=test-case-4", out) | ||
|
||
// do not fail | ||
code, err := shell.GetExitCodeForRunCommandError(err) | ||
|
@@ -187,7 +193,9 @@ func TestCase5(t *testing.T) { | |
|
||
out, err := shell.RunCommandAndGetOutputE(t, cmd) | ||
assert.Nil(t, err) | ||
assert.Regexp(t, "Building.*image=test-case-5", out) | ||
// no --build flag | ||
assert.NotNil(t, out) | ||
// assert.Regexp(t, "Building.*image=test-case-5", out) | ||
|
||
// do not fail | ||
code, err := shell.GetExitCodeForRunCommandError(err) | ||
|
@@ -207,7 +215,9 @@ func TestCase6(t *testing.T) { | |
|
||
out, err := shell.RunCommandAndGetOutputE(t, cmd) | ||
assert.Nil(t, err) | ||
assert.Regexp(t, "Building.*image=test-case-6", out) | ||
// no --build flags | ||
assert.NotNil(t, out) | ||
// assert.Regexp(t, "Building.*image=test-case-6", out) | ||
|
||
// do not fail | ||
code, err := shell.GetExitCodeForRunCommandError(err) | ||
|
@@ -226,7 +236,9 @@ func TestCase7(t *testing.T) { | |
|
||
out, err := shell.RunCommandAndGetOutputE(t, cmd) | ||
assert.Nil(t, err) | ||
assert.Regexp(t, "Building.*image=test-case-7", out) | ||
// no --build flag | ||
assert.NotNil(t, out) | ||
// assert.Regexp(t, "Building.*image=test-case-7", out) | ||
|
||
// do not fail | ||
code, err := shell.GetExitCodeForRunCommandError(err) | ||
|
@@ -246,7 +258,9 @@ func TestCase8(t *testing.T) { | |
|
||
out, err := shell.RunCommandAndGetOutputE(t, cmd) | ||
assert.Nil(t, err) | ||
assert.Regexp(t, "Building.*image=test-case-8", out) | ||
// no --build flag | ||
assert.NotNil(t, out) | ||
// assert.Regexp(t, "Building.*image=test-case-8", out) | ||
assert.Contains(t, out, "Skipping excluded config set=") | ||
|
||
// do not fail | ||
|
@@ -266,7 +280,9 @@ func TestCase9(t *testing.T) { | |
|
||
out, err := shell.RunCommandAndGetOutputE(t, cmd) | ||
assert.Nil(t, err) | ||
assert.Regexp(t, "Building.*image=test-case-9", out) | ||
// no --build flag | ||
assert.NotNil(t, out) | ||
// assert.Regexp(t, "Building.*image=test-case-9", out) | ||
|
||
// should generage args | ||
// FIXME: amend after changes | ||
|