From fd7978a5d74454b3f6b7eee4837d66f9963846aa Mon Sep 17 00:00:00 2001 From: David Kornel Date: Mon, 22 Jan 2024 12:57:53 +0100 Subject: [PATCH] Log full list of ns and pods when test fails Signed-off-by: David Kornel --- src/main/java/io/odh/test/framework/logs/LogCollector.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/io/odh/test/framework/logs/LogCollector.java b/src/main/java/io/odh/test/framework/logs/LogCollector.java index bf41d35b..3b2d61af 100644 --- a/src/main/java/io/odh/test/framework/logs/LogCollector.java +++ b/src/main/java/io/odh/test/framework/logs/LogCollector.java @@ -83,6 +83,8 @@ private static void saveClusterState(Path logpath) throws IOException { // Collecting cluster wide resources and CRs Files.writeString(logpath.resolve("describe-cluster-nodes.log"), cmdClient.exec(false, false, "describe", "nodes").out()); + Files.writeString(logpath.resolve("namespaces.log"), cmdClient.exec(false, false, "get", "ns").out()); + Files.writeString(logpath.resolve("pods.log"), cmdClient.exec(false, false, "get", "po", "--all-namespaces").out()); Files.writeString(logpath.resolve("all-events.log"), cmdClient.exec(false, false, "get", "events", "--all-namespaces").out()); Files.writeString(logpath.resolve("pvs.log"), cmdClient.exec(false, false, "describe", "pv").out()); Files.writeString(logpath.resolve("dsc.yml"), cmdClient.exec(false, false, "get", "dsc", "-o", "yaml").out());