Skip to content

Commit

Permalink
test: Fix the missing KUBECONFIG env variable (#915)
Browse files Browse the repository at this point in the history
The ExecWithDebug function is invoked to run `nomos status`, which
requires the KUBECONFIG env variable to be set. Otherwise, `nomos
status` will fail with no cluster info, for example,
https://oss.gprow.dev/view/gs/oss-prow-build-kpt-config-sync/logs/kpt-config-sync-standard-rapid-latest-stress/1709417838403391488.
  • Loading branch information
nan-yu authored Oct 4, 2023
1 parent f2e280d commit d3d3393
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion e2e/nomostest/testshell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ func (tc *TestShell) Helm(args ...string) ([]byte, error) {
// KUBECONFIG environment variable and debug logging.
func (tc *TestShell) ExecWithDebug(name string, args ...string) ([]byte, error) {
tc.Logger.Debugf("%s %s", name, strings.Join(args, " "))
out, err := exec.Command(name, args...).CombinedOutput()
cmd := tc.Command(name, args...)
out, err := cmd.CombinedOutput()
if err != nil {
if !tc.Logger.IsDebugEnabled() {
tc.Logger.Infof("%s %s", name, strings.Join(args, " "))
Expand Down

0 comments on commit d3d3393

Please sign in to comment.