Skip to content

Commit

Permalink
BAT test for story: user can restore director db from a backup.
Browse files Browse the repository at this point in the history
  • Loading branch information
guoger committed Dec 29, 2015
1 parent 4e940bc commit 694392a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/system/with_release_stemcell_deployment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,19 @@
end
end
end

describe 'restore' do
it 'should restore director DB' do
with_tmpdir do
expect(bosh_safe('backup one_deployment.tgz')).to succeed_with /Backup of BOSH director was put in.*one_deployment\.tgz/
expect(bosh_safe("delete deployment #{deployment_name}")).to succeed_with /Deleted deployment/
expect(bosh_safe('backup no_deployment.tgz')).to succeed_with /Backup of BOSH director was put in.*no_deployment\.tgz/
expect(bosh_safe('restore one_deployment.tgz')).to succeed_with /Restore done!/
expect(bosh_safe('deployments')).to succeed_with /#{deployment_name}/
expect(bosh_safe('restore no_deployment.tgz')).to succeed_with /Restore done!/
result = bosh_safe('deployments')
expect(result.output).to match_regex(/No deployments/)
end
end
end
end

0 comments on commit 694392a

Please sign in to comment.