@@ -19,7 +19,7 @@ import (
19
19
"fmt"
20
20
"os"
21
21
"os/exec"
22
- "path"
22
+ "path/filepath "
23
23
"strings"
24
24
"testing"
25
25
"time"
@@ -54,7 +54,7 @@ func init() {
54
54
if ! ok {
55
55
TestTempDir = "../.."
56
56
}
57
- TestTempDir = path .Join (TestTempDir , "build/_test" )
57
+ TestTempDir = filepath .Join (TestTempDir , "build/_test" )
58
58
err := os .MkdirAll (TestTempDir , os .FileMode (0755 ))
59
59
if err != nil {
60
60
panic (err )
@@ -200,7 +200,7 @@ func TestVolumeDrain_Downscale(t *testing.T) {
200
200
require .NoError (t , c .GetClient ().Get (ctx , client .ObjectKeyFromObject (pvc ), pvc ))
201
201
assert .Equal (t , "drained" , pvc .GetLabels ()["logging.banzaicloud.io/drain-status" ])
202
202
}, func (t * testing.T , c common.Cluster ) error {
203
- path := fmt .Sprintf ("%s/ cluster-%s.log" , TestTempDir , t .Name ())
203
+ path := filepath . Join ( TestTempDir , fmt .Sprintf ("cluster-%s.log" , t .Name () ))
204
204
t .Logf ("Printing cluster logs to %s" , path )
205
205
return c .PrintLogs (common.PrintLogConfig {
206
206
Namespaces : []string {ns , "default" },
@@ -359,7 +359,7 @@ func TestVolumeDrain_Downscale_DeleteVolume(t *testing.T) {
359
359
360
360
require .Eventually (t , cond .ResourceShouldBeAbsent (t , c .GetClient (), common .Resource (new (corev1.PersistentVolumeClaim ), ns , logging .Name + "-fluentd-buffer-" + fluentdReplicaName )), 30 * time .Second , time .Second / 2 )
361
361
}, func (t * testing.T , c common.Cluster ) error {
362
- path := fmt .Sprintf ("%s/ cluster-%s.log" , TestTempDir , t .Name ())
362
+ path := filepath . Join ( TestTempDir , fmt .Sprintf ("cluster-%s.log" , t .Name () ))
363
363
t .Logf ("Printing cluster logs to %s" , path )
364
364
return c .PrintLogs (common.PrintLogConfig {
365
365
Namespaces : []string {ns , "default" },
0 commit comments