Skip to content

Commit

Permalink
test/test_utils: Use kind instead of full GVK for tkn commands. (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
wlynch authored Dec 16, 2022
1 parent 6d3449f commit 34161cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ func setConfigMap(ctx context.Context, t *testing.T, c *clients, data map[string
}

func printDebugging(t *testing.T, obj objects.TektonObject) {
kind := obj.GetObjectKind().GroupVersionKind().Kind

t.Logf("============================== %s logs ==============================", obj.GetGVK())
output, _ := exec.Command("tkn", obj.GetGVK(), "logs", "-n", obj.GetNamespace(), obj.GetName()).CombinedOutput()
output, _ := exec.Command("tkn", kind, "logs", "-n", obj.GetNamespace(), obj.GetName()).CombinedOutput()
t.Log(string(output))

t.Logf("============================== %s describe ==============================", obj.GetGVK())
output, _ = exec.Command("tkn", obj.GetGVK(), "describe", "-n", obj.GetNamespace(), obj.GetName()).CombinedOutput()
output, _ = exec.Command("tkn", kind, "describe", "-n", obj.GetNamespace(), obj.GetName()).CombinedOutput()
t.Log(string(output))

t.Log("============================== chains controller logs ==============================")
Expand Down

0 comments on commit 34161cd

Please sign in to comment.