fix tests

This commit is contained in:
Vladyslav Yurchenko
2026-01-15 15:04:51 +02:00
parent 960ab165f0
commit 440e65d310

View File

@@ -243,9 +243,6 @@ func TestIndividualFiles(t *testing.T) {
}
for resource := range requestedClusterReports {
if resource != "pg" {
continue
}
cmd := exec.Command("../../../bin/pt-k8s-debug-collector",
"--kubeconfig", config,
"--forwardport", os.Getenv("FORWARDPORT"),
@@ -262,6 +259,10 @@ func TestIndividualFiles(t *testing.T) {
}()
for _, test := range tests {
if !slices.Contains(resources, test.resource) {
continue
}
out, err := exec.Command(test.cmd[0], test.cmd[1:]...).CombinedOutput()
if err != nil {
t.Errorf("test %s, error running command %s:\n%s\nOutput:\n%s", test.name, test.cmd[0], err.Error(), out)