Skip to content

Commit ef51888

Browse files
Ivaylogi98aramprice
authored andcommitted
Add tests for InstanceStorageDevicePattern and InstanceStorageManagedVolumePattern in aws_spec.rb
1 parent ca5a6c7 commit ef51888

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

bosh-stemcell/spec/stemcells/aws_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@
2424
end
2525
end
2626

27+
context "installed by bosh_aws_agent_settings" do
28+
describe file("/var/vcap/bosh/agent.json") do
29+
it { should be_valid_json_file }
30+
31+
it "sets InstanceStorageDevicePattern for NVMe instance storage" do
32+
config = JSON.parse(subject.content)
33+
expect(config.dig("Platform", "Linux", "InstanceStorageDevicePattern")).to eq("/dev/nvme*n1")
34+
end
35+
36+
it "sets InstanceStorageManagedVolumePattern to exclude EBS volumes" do
37+
config = JSON.parse(subject.content)
38+
expect(config.dig("Platform", "Linux", "InstanceStorageManagedVolumePattern")).to eq("/dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_*")
39+
end
40+
end
41+
end
42+
2743
describe "nvme" do
2844
describe "nvme-id finder" do
2945
subject { file("/sbin/nvme-id") }

0 commit comments

Comments
 (0)