Commit 4e9284a0 authored by Marin Jankovski's avatar Marin Jankovski

Clear state in test satellite dir.

parent e16eb912
...@@ -66,6 +66,7 @@ FactoryGirl.define do ...@@ -66,6 +66,7 @@ FactoryGirl.define do
after :create do |project| after :create do |project|
TestEnv.clear_repo_dir(project.namespace, project.path) TestEnv.clear_repo_dir(project.namespace, project.path)
TestEnv.reset_satellite_dir
TestEnv.create_repo(project.namespace, project.path) TestEnv.create_repo(project.namespace, project.path)
end end
end end
......
...@@ -97,6 +97,15 @@ module TestEnv ...@@ -97,6 +97,15 @@ module TestEnv
FileUtils.rm_rf File.join(testing_path(), "#{name}.wiki.git") FileUtils.rm_rf File.join(testing_path(), "#{name}.wiki.git")
end end
def reset_satellite_dir
setup_stubs
FileUtils.cd(seed_satellite_path) do
`git reset --hard --quiet`
`git clean -fx`
`git checkout --quiet origin/master`
end
end
# Create a repo and it's satellite # Create a repo and it's satellite
def create_repo(namespace, name) def create_repo(namespace, name)
setup_stubs setup_stubs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment