Commit 7d901771 authored by Marin Jankovski's avatar Marin Jankovski

Revert "Merge branch 'backup-verify-bundle' into 'master'"

This reverts merge request !368
parent 56cce6b1
Pipeline #25484624 failed with stages
in 31 minutes and 31 seconds
......@@ -245,7 +245,6 @@ stable:
GITLAB_PASSWORD: $ROOT_PASSWORD
RELEASE_NAME: $CI_ENVIRONMENT_SLUG
S3_CONFIG_PATH: /etc/gitlab/minio
LANG: C.UTF-8
script:
- source variables
- apt-get update && apt-get install -y --no-install-recommends curl ca-certificates
......
......@@ -98,27 +98,14 @@ describe "Restoring a backup" do
end
Dir.glob("/tmp/original_backup/**/*") do |file|
next if ['.tar', '.gz'].include? File.extname(file)
next if ['tar', '.gz'].include? File.extname(file)
next if File.directory?(file)
next if File.basename(file) == 'backup_information.yml'
test_counterpart = file.gsub('original_backup', 'test_backup')
expect(File.exist?(test_counterpart)).to be_truthy, "Expected #{test_counterpart} to exist"
# Use git to verify the contents of bundles
if File.extname(file) == '.bundle'
original_content, status = Open3.capture2e("git ls-remote --heads --tags #{file}")
fail original_content unless status.success?
test_content, status = Open3.capture2e("git ls-remote --heads --tags #{test_counterpart}")
fail test_content unless status.success?
else
original_content = File.read(file)
test_content = File.read(test_counterpart)
end
expect(Digest::MD5.hexdigest(original_content)).to eq(Digest::MD5.hexdigest(test_content)),
expect(Digest::MD5.hexdigest(File.read(file))).to eq(Digest::MD5.hexdigest(File.read(test_counterpart))),
"Expected #{file} to equal #{test_counterpart}"
end
end
......
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