start integration testing
This commit is contained in:
@@ -7,9 +7,16 @@ import (
|
||||
)
|
||||
|
||||
func TestRunCommandFileTest(t *testing.T) {
|
||||
|
||||
filePath := "packageCommands.yml"
|
||||
cmdLineStr := fmt.Sprintf("go run ../backy.go exec host -c checkDockerNoVersion -m localhost --cmdStdOut -f %s", filePath)
|
||||
|
||||
exec.Command("bash", "-c", cmdLineStr).Output()
|
||||
cmd := exec.Command("bash", "-c", cmdLineStr)
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
t.Fatalf("Command failed: %v, Output: %s", err, string(output))
|
||||
}
|
||||
|
||||
if len(output) == 0 {
|
||||
t.Fatal("Expected command output, got none")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user