spec/bosh/stemcell/archive_filename_spec.rb in bosh-stemcell-1.5.0.pre.1210 vs spec/bosh/stemcell/archive_filename_spec.rb in bosh-stemcell-1.5.0.pre.1211
- old
+ new
@@ -35,8 +35,22 @@
it 'prefixes the name with "light-"' do
expect(archive_filename.to_s).to eq ('light-FAKE_NAME-007-INFRASTRUCTURE-HYPERVISOR-OPERATING_SYSTEM.tgz')
end
end
+
+ context 'when stemcell has ruby agent' do
+ it 'does not include the agent name in the archive name' do
+ archive_filename = ArchiveFilename.new(version, infrastructure, operating_system, 'FAKE_NAME', false, 'ruby')
+ expect(archive_filename.to_s).to eq ('FAKE_NAME-007-INFRASTRUCTURE-HYPERVISOR-OPERATING_SYSTEM.tgz')
+ end
+ end
+
+ context 'when stemcell has go agent' do
+ it 'includes go_agent in the archive name' do
+ archive_filename = ArchiveFilename.new(version, infrastructure, operating_system, 'FAKE_NAME', false, 'go')
+ expect(archive_filename.to_s).to eq ('FAKE_NAME-007-INFRASTRUCTURE-HYPERVISOR-OPERATING_SYSTEM-go_agent.tgz')
+ end
+ end
end
end
end