Commit 33b71d04 authored by Tiffany Rea's avatar Tiffany Rea

Merge branch 'jmd-update-list-untracked-repos-e2e' into 'master'

Update list-untracked-repositories E2E to allow for 24 hours grace period

See merge request gitlab-org/gitlab!84331
parents 3aea263f 5855bb79
...@@ -530,9 +530,17 @@ module QA ...@@ -530,9 +530,17 @@ module QA
storage_repositories[2..-3] storage_repositories[2..-3]
end end
def modify_repo_access_time(node, repo_path, update_time)
repo = "/var/opt/gitlab/git-data/repositories/#{repo_path}"
shell(%{
docker exec --user git #{node} bash -c 'find #{repo} -exec touch -d "#{update_time}" {} \\;'
})
end
def add_repo_to_disk(node, repo_path) def add_repo_to_disk(node, repo_path)
cmd = "GIT_DIR=. git init --initial-branch=main /var/opt/gitlab/git-data/repositories/#{repo_path}" cmd = "GIT_DIR=. git init --initial-branch=main /var/opt/gitlab/git-data/repositories/#{repo_path}"
shell "docker exec --user git #{node} bash -c '#{cmd}'" shell "docker exec --user git #{node} bash -c '#{cmd}'"
modify_repo_access_time(node, repo_path, "24 hours ago")
end end
def remove_repo_from_disk(repo_path) def remove_repo_from_disk(repo_path)
......
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