Skip to content

Commit 78ef78c

Browse files
committed
no parameters
1 parent 559aa48 commit 78ef78c

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

internal/testtools/deb_test.go

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ func TestStableToUnstable(t *testing.T) {
2525
majorTag := majorTag(t, tagAppCli)
2626
_ = minorTag(t, tagAppCli)
2727

28+
ls(t)
29+
2830
fmt.Printf("Updating from stable version %s to unstable version %s \n", tagAppCli, majorTag)
2931
fmt.Printf("Building local deb version %s \n", majorTag)
3032
buildDebVersion(t, majorTag, *arch)
@@ -173,13 +175,7 @@ func minorTag(t *testing.T, tag string) string {
173175
func buildDockerImage(t *testing.T, dockerfile, name, arch string) {
174176
t.Helper()
175177

176-
cmd := exec.Command(
177-
"docker", "buildx", "build",
178-
"--platform", "linux/amd64",
179-
"-t", name,
180-
"-f", dockerfile,
181-
".",
182-
)
178+
cmd := exec.Command("docker", "build", "-t", name, "-f", dockerfile, ".")
183179
// Capture both stdout and stderr
184180
var out bytes.Buffer
185181
var stderr bytes.Buffer
@@ -288,3 +284,23 @@ func moveDeb(t *testing.T, startDir, targetDir, repo string, tagVersion string,
288284
panic(fmt.Errorf("failed to move deb file: %w", err))
289285
}
290286
}
287+
288+
func ls(t *testing.T) string {
289+
t.Helper()
290+
cwd, err := os.Getwd()
291+
if err != nil {
292+
fmt.Println("Error getting working directory:", err)
293+
return "ls error"
294+
}
295+
296+
fmt.Println("Current directory:", cwd)
297+
298+
// Run "ls -l" to list files
299+
cmd := exec.Command("ls", "-l")
300+
output, err := cmd.CombinedOutput()
301+
if err != nil {
302+
fmt.Println("Error running ls:", err)
303+
return "ls error"
304+
}
305+
return string(output)
306+
}

0 commit comments

Comments
 (0)