From 3531d5b14d917c1b39eec18e42a95bab59c3808a Mon Sep 17 00:00:00 2001 From: Hanchi Zhang Date: Fri, 7 Mar 2025 19:31:17 +0000 Subject: [PATCH] Print out config file being applied in tests. --- test/k8s-integration/driver-config.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/k8s-integration/driver-config.go b/test/k8s-integration/driver-config.go index a6c6cfdf8..76b43cee8 100644 --- a/test/k8s-integration/driver-config.go +++ b/test/k8s-integration/driver-config.go @@ -2,11 +2,14 @@ package main import ( "bufio" + "bytes" "fmt" "os" "path/filepath" "strings" "text/template" + + "k8s.io/klog/v2" ) type driverConfig struct { @@ -169,5 +172,13 @@ func generateDriverConfigFile(testParams *testParameters) (string, error) { return "", err } + // Also print the config file + var strBuf bytes.Buffer + err = t.Execute(&strBuf, params) + if err != nil { + klog.Warningf("Failed to print storage test config file: %v", err) + } + klog.Infof("Executing test with the following config:\n%v", strBuf.String()) + return configFilePath, nil }