File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
integration/integrationtest Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -333,14 +333,6 @@ func EnvVar(k, v string) string {
333
333
return fmt .Sprintf ("%s=%s" , k , v )
334
334
}
335
335
336
- func WriteFile (t * testing.T , path , contents string ) {
337
- t .Helper ()
338
-
339
- //nolint:gosec
340
- err := os .WriteFile (path , []byte (contents ), 0644 )
341
- require .NoError (t , err )
342
- }
343
-
344
336
func DockerBridgeIP (t testing.TB ) string {
345
337
t .Helper ()
346
338
@@ -512,6 +504,7 @@ func (t *testWriter) Write(b []byte) (int, error) {
512
504
t .t .Logf ("%s" , b )
513
505
return len (b ), nil
514
506
}
507
+
515
508
func BindMount (src , dst string , ro bool ) docker.HostMount {
516
509
return docker.HostMount {
517
510
Source : src ,
Original file line number Diff line number Diff line change @@ -24,7 +24,15 @@ func MkdirAll(t testing.TB, elem ...string) string {
24
24
t .Helper ()
25
25
26
26
path := filepath .Join (elem ... )
27
- err := os .MkdirAll (path , 0777 )
27
+ err := os .MkdirAll (path , 0o777 )
28
28
require .NoError (t , err )
29
29
return path
30
30
}
31
+
32
+ func WriteFile (t * testing.T , path , contents string ) {
33
+ t .Helper ()
34
+
35
+ //nolint:gosec
36
+ err := os .WriteFile (path , []byte (contents ), 0o644 )
37
+ require .NoError (t , err )
38
+ }
You can’t perform that action at this time.
0 commit comments