generated from konveyor-ecosystem/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fix labels validation print (#251)
* Fix labels validation print Fixing fmt.Fprintln to correctly recognize first argument as a writer buffer. Bug was introduced in #243 Should fix kantra CI. Signed-off-by: Marek Aufart <[email protected]> * Force runnerImg env lookup Signed-off-by: Marek Aufart <[email protected]> * Fix env config load override Signed-off-by: Marek Aufart <[email protected]> * Revert "Fix env config load override" This reverts commit 2950638. Signed-off-by: Marek Aufart <[email protected]> * Update env settings with field values Signed-off-by: Marek Aufart <[email protected]> * Adding RUNNER_IMG setting test Signed-off-by: Marek Aufart <[email protected]> * Revert Settings changes Signed-off-by: Marek Aufart <[email protected]> --------- Signed-off-by: Marek Aufart <[email protected]>
- Loading branch information
Showing
3 changed files
with
34 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package cmd | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
) | ||
|
||
// Test RUNNER_IMG settings | ||
func TestRunnerImgDefault(t *testing.T) { | ||
os.Unsetenv("RUNNER_IMG") // Ensure empty variable | ||
s := &Config{} | ||
s.Load(); | ||
if s.RunnerImage != "quay.io/konveyor/kantra:latest" { | ||
t.Errorf("Unexpected RUNNER_IMG default: %s", s.RunnerImage) | ||
} | ||
} | ||
|
||
func TestRunnerImgCustom(t *testing.T) { | ||
os.Setenv("RUNNER_IMG", "quay.io/some-contributor/my-kantra") | ||
s := &Config{} | ||
s.Load(); | ||
if s.RunnerImage != "quay.io/some-contributor/my-kantra:latest" { | ||
t.Errorf("Unexpected RUNNER_IMG: %s", s.RunnerImage) | ||
} | ||
} |