Skip to content

Commit

Permalink
Merge pull request #12 from guoger/db-restore
Browse files Browse the repository at this point in the history
BAT test for story: user can restore director db from a backup.
  • Loading branch information
cunnie authored and lwoydziak committed Jan 12, 2016
1 parent a93a308 commit cbc09b7
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 cbc09b7

Please sign in to comment.