@@ -17,13 +17,6 @@ func TestCopyToContainerTestable(t *testing.T) {
1717 }
1818
1919 remote , local := initTestDirs (t )
20- defer os .RemoveAll (remote )
21- defer os .RemoveAll (local )
22- containerPath := "/testDir"
23-
24- syncClient := createTestSyncClient (local , remote )
25-
26- syncClient .errorChan = make (chan error )
2720
2821 excludePaths := []string {}
2922
@@ -45,7 +38,7 @@ func TestCopyToContainerTestable(t *testing.T) {
4538
4639 ioutil .WriteFile (path .Join (local , "ignoredFolder" , "testFile1" ), []byte (fileContents ), 0666 )
4740
48- err := copyToContainerTestable (syncClient . Kubectl , syncClient . Pod , syncClient . Container , local , containerPath , excludePaths , true )
41+ err := copyToContainerTestable (nil , nil , nil , local , remote , excludePaths , true )
4942 if err != nil {
5043 t .Error (err )
5144 return
@@ -108,14 +101,6 @@ func TestCopyToContainerTestable(t *testing.T) {
108101
109102 checkFilesAndFolders (t , filesToCheck , foldersToCheck , local , remote , 10 * time .Second )
110103
111- // Check if there is an error in the error channel
112- select {
113- case err = <- syncClient .errorChan :
114- t .Error (err )
115- return
116- default :
117- }
118-
119104}
120105
121106type checkedFileOrFolder struct {
0 commit comments