Files
backy/tests/files_test.go
Andrew Woodlee 803b039849
Some checks failed
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline failed
start integration testing
2025-12-08 18:12:31 -06:00

23 lines
506 B
Go

package tests
import (
"fmt"
"os/exec"
"testing"
)
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)
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")
}
}