Skip to content

Commit 3531d5b

Browse files
committed
Print out config file being applied in tests.
1 parent d7c5a23 commit 3531d5b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/k8s-integration/driver-config.go

+11
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ package main
22

33
import (
44
"bufio"
5+
"bytes"
56
"fmt"
67
"os"
78
"path/filepath"
89
"strings"
910
"text/template"
11+
12+
"k8s.io/klog/v2"
1013
)
1114

1215
type driverConfig struct {
@@ -169,5 +172,13 @@ func generateDriverConfigFile(testParams *testParameters) (string, error) {
169172
return "", err
170173
}
171174

175+
// Also print the config file
176+
var strBuf bytes.Buffer
177+
err = t.Execute(&strBuf, params)
178+
if err != nil {
179+
klog.Warningf("Failed to print storage test config file: %v", err)
180+
}
181+
klog.Infof("Executing test with the following config:\n%v", strBuf.String())
182+
172183
return configFilePath, nil
173184
}

0 commit comments

Comments
 (0)