(t *testing.T)
| 188 | } |
| 189 | |
| 190 | func TestFastWalkBasic(t *testing.T) { |
| 191 | wd, err := os.Getwd() |
| 192 | assert.NoError(t, err) |
| 193 | |
| 194 | rootDir := t.TempDir() |
| 195 | os.Chdir(rootDir) |
| 196 | defer os.Chdir(wd) |
| 197 | |
| 198 | expectedEntries := createFastWalkInputData(10, 160) |
| 199 | |
| 200 | walker := fastWalkWithExcludeFiles(expectedEntries[0]) |
| 201 | gotEntries, gotErrors := collectFastWalkResults(walker.ch) |
| 202 | |
| 203 | assert.Empty(t, gotErrors) |
| 204 | |
| 205 | sort.Strings(expectedEntries) |
| 206 | sort.Strings(gotEntries) |
| 207 | assert.Equal(t, expectedEntries, gotEntries) |
| 208 | } |
| 209 | |
| 210 | // Make test data - ensure you've Chdir'ed into a temp dir first |
| 211 | // Returns list of files/dirs that are created |
nothing calls this directly
no test coverage detected