| 240 | } |
| 241 | |
| 242 | func (g *TestSetupManager) SetLocalData(path string) bool { |
| 243 | if !assert.NoError(g.T, copyutil.CopyDir( |
| 244 | filepath.Join(g.UpstreamRepo.DatasetDirectory, path), |
| 245 | filepath.Join(g.LocalWorkspace.WorkspaceDirectory, g.UpstreamRepo.RepoName))) { |
| 246 | return false |
| 247 | } |
| 248 | localGit := gitutil.NewLocalGitRunner(g.LocalWorkspace.WorkspaceDirectory) |
| 249 | if !assert.NoError(g.T, localGit.Run("add", ".")) { |
| 250 | return false |
| 251 | } |
| 252 | if !assert.NoError(g.T, localGit.Run("commit", "-m", "add files")) { |
| 253 | return false |
| 254 | } |
| 255 | return true |
| 256 | } |
| 257 | |
| 258 | func (g *TestSetupManager) Clean() { |
| 259 | g.cleanTestRepo() |