mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
dra e2e: using logging for background activity
ginkgo.By should be used for steps in the test flow. Creating and deleting CDI files happens in parallel to that. If reported via ginkgo.By, progress reports look weird because they contain e.g. step "waiting for...." (from the main test, which is still on-going) and end with "creating CDI file" (which is already completed).
This commit is contained in:
parent
b3d94ae74f
commit
4a5a242a68
@ -214,11 +214,11 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) {
|
|||||||
plugin, err := app.StartPlugin(logger, "/cdi", d.Name, nodename,
|
plugin, err := app.StartPlugin(logger, "/cdi", d.Name, nodename,
|
||||||
app.FileOperations{
|
app.FileOperations{
|
||||||
Create: func(name string, content []byte) error {
|
Create: func(name string, content []byte) error {
|
||||||
ginkgo.By(fmt.Sprintf("creating CDI file %s on node %s:\n%s", name, nodename, string(content)))
|
klog.Background().Info("creating CDI file", "node", nodename, "filename", name, "content", string(content))
|
||||||
return d.createFile(&pod, name, content)
|
return d.createFile(&pod, name, content)
|
||||||
},
|
},
|
||||||
Remove: func(name string) error {
|
Remove: func(name string) error {
|
||||||
ginkgo.By(fmt.Sprintf("deleting CDI file %s on node %s", name, nodename))
|
klog.Background().Info("deleting CDI file", "node", nodename, "filename", name)
|
||||||
return d.removeFile(&pod, name)
|
return d.removeFile(&pod, name)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user