@@ -120,11 +120,13 @@ func checkFilesAndFolders(t *testing.T, files []checkedFileOrFolder, folders []c
120120Outer:
121121 for time .Since (beginTimeStamp ) < timeout {
122122
123- /*If something is expected to be there but it isn't, we expect that the sync-job isn't finished yet.
124- Therefore we continue the outer Loop until everything is there or the time runs up.
123+ /*
124+ If something is expected to be there but it isn't, we expect that the sync-job isn't finished yet.
125+ The same applies if a file has missing content.
126+ Therefore we continue the outer Loop until everything is there or the time runs up.
125127
126- If something unexpected happens like an unxpected error or wrong file content or a wrong file type
127- or the existance of a file or folder that shouldn't be there, we let the test fail and return*/
128+ If something unexpected happens like an unxpected error or wrong file content or a wrong file type
129+ or the existance of a file or folder that shouldn't be there, we let the test fail and return*/
128130 // Check files
129131 FileCheck:
130132 for _ , v := range files {
@@ -164,15 +166,15 @@ Outer:
164166
165167 if v .shouldExistInLocal {
166168 if string (localData ) != fileContents {
167- t . Errorf ( "Wrong file contents in file %s, got %s, expected %s" , localFile , string ( localData ), fileContents )
168- return
169+ missingFileOrFolder = v
170+ continue Outer
169171 }
170172 }
171173
172174 if v .shouldExistInRemote {
173175 if string (remoteData ) != fileContents {
174- t . Errorf ( "Wrong file contents in file %s, got %s, expected %s" , remoteFile , string ( remoteData ), fileContents )
175- return
176+ missingFileOrFolder = v
177+ continue Outer
176178 }
177179 }
178180 }
0 commit comments