Skip to content

Commit 0a2c521

Browse files
committed
debug tests
1 parent 9d7b6be commit 0a2c521

File tree

1 file changed

+14
-26
lines changed

1 file changed

+14
-26
lines changed

e2e/install_test.go

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"encoding/base64"
55
"fmt"
66
"os"
7+
"os/exec"
78
"strings"
89
"testing"
910
"time"
@@ -72,6 +73,18 @@ func TestSingleNodeInstallationAlmaLinux8(t *testing.T) {
7273

7374
RequireEnvVars(t, []string{"SHORT_SHA"})
7475

76+
out, err := exec.Command("bash", "-c", "echo $PATH").CombinedOutput()
77+
fmt.Println(err)
78+
fmt.Println(out)
79+
80+
out, err = exec.Command("which", "ssh").CombinedOutput()
81+
fmt.Println(err)
82+
fmt.Println(out)
83+
84+
out, err = exec.Command("which", "scp").CombinedOutput()
85+
fmt.Println(err)
86+
fmt.Println(out)
87+
7588
tc := cmx.NewCluster(&cmx.ClusterInput{
7689
T: t,
7790
Nodes: 1,
@@ -80,33 +93,8 @@ func TestSingleNodeInstallationAlmaLinux8(t *testing.T) {
8093
})
8194
defer tc.Cleanup()
8295

83-
// testing some stuff with the env
84-
t.Logf("%s: testing env", time.Now().Format(time.RFC3339))
85-
line := []string{"which ssh"}
86-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
87-
t.Fatalf("fail to check postupgrade state: %v: %s: %s", err, stdout, stderr)
88-
} else {
89-
t.Log(stdout)
90-
}
91-
92-
t.Logf("%s: testing env", time.Now().Format(time.RFC3339))
93-
line = []string{"echo $PATH"}
94-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
95-
t.Fatalf("fail to check postupgrade state: %v: %s: %s", err, stdout, stderr)
96-
} else {
97-
t.Log(stdout)
98-
}
99-
100-
t.Logf("%s: testing env", time.Now().Format(time.RFC3339))
101-
line = []string{"which scp"}
102-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
103-
t.Fatalf("fail to check postupgrade state: %v: %s: %s", err, stdout, stderr)
104-
} else {
105-
t.Log(stdout)
106-
}
107-
10896
t.Logf("%s: installing tar", time.Now().Format(time.RFC3339))
109-
line = []string{"yum-install-tar.sh"}
97+
line := []string{"yum-install-tar.sh"}
11098
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
11199
t.Fatalf("fail to check postupgrade state: %v: %s: %s", err, stdout, stderr)
112100
}

0 commit comments

Comments
 (0)