Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cloudfoundry/bosh
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 9, 2017
2 parents 1e2c952 + 4560346 commit 3547696
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/spec/gocli/integration/cli_instances_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,22 @@
# persistent disk was not deployed
expect(vitals[:persistent_disk_usage]).to eq('')
end

it "retrieves instances from deployments in parallel" do
manifest1 = Bosh::Spec::Deployments.simple_manifest
manifest1['name'] = 'simple1'
manifest1['jobs'] = [Bosh::Spec::Deployments.simple_job({:name => 'foobar1', :instances => 2})]
deploy_from_scratch(manifest_hash: manifest1)

manifest2 = Bosh::Spec::Deployments.simple_manifest
manifest2['name'] = 'simple2'
manifest2['jobs'] = [Bosh::Spec::Deployments.simple_job({:name => 'foobar2', :instances => 4})]
deploy_from_scratch(manifest_hash: manifest2)

output = bosh_runner.run('instances --parallel 5')
expect(output).to include('Succeeded')
# 2 deployments must not be mixed in the output, but they can be printed in any order
expect(output).to match(/Deployment 'simple1'\s*\n\nInstance\s+Process\s+State\s+AZ\s+IPs\s*\n(foobar1\/\w+-\w+-\w+-\w+-\w+\s+running\s+-\s+\d+.\d+.\d+.\d+\s*\n){2}\n2 instances/)
expect(output).to match(/Deployment 'simple2'\s*\n\nInstance\s+Process\s+State\s+AZ\s+IPs\s*\n(foobar2\/\w+-\w+-\w+-\w+-\w+\s+running\s+-\s+\d+.\d+.\d+.\d+\s*\n){4}\n4 instances/)
end
end
18 changes: 18 additions & 0 deletions src/spec/gocli/integration/cli_vms_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,22 @@
expect(first_row).to include('persistent_disk_usage')
expect(output.length).to eq(3)
end

it "retrieves vms from deployments in parallel" do
manifest1 = Bosh::Spec::Deployments.simple_manifest
manifest1['name'] = 'simple1'
manifest1['jobs'] = [Bosh::Spec::Deployments.simple_job({:name => 'foobar1', :instances => 2})]
deploy_from_scratch(manifest_hash: manifest1)

manifest2 = Bosh::Spec::Deployments.simple_manifest
manifest2['name'] = 'simple2'
manifest2['jobs'] = [Bosh::Spec::Deployments.simple_job({:name => 'foobar2', :instances => 4})]
deploy_from_scratch(manifest_hash: manifest2)

output = bosh_runner.run('vms --parallel 5')
expect(output).to include('Succeeded')
# 2 deployments must not be mixed in the output, but they can be printed in any order
expect(output).to match(/Deployment 'simple1'\s*\n\nInstance\s+Process\s+State\s+AZ\s+IPs\s+VM\s+CID\s+VM\s+Type\s*\n(foobar1\/\w+-\w+-\w+-\w+-\w+\s+running\s+-\s+\d+.\d+.\d+.\d+\s+\d+\s+a\s*\n){2}\n2 vms/)
expect(output).to match(/Deployment 'simple2'\s*\n\nInstance\s+Process\s+State\s+AZ\s+IPs\s+VM\s+CID\s+VM\s+Type\s*\n(foobar2\/\w+-\w+-\w+-\w+-\w+\s+running\s+-\s+\d+.\d+.\d+.\d+\s+\d+\s+a\s*\n){4}\n4 vms/)
end
end

0 comments on commit 3547696

Please sign in to comment.