File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
test/integration/instance_with_config_file/controls Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 51
51
it "should have the right number of hostPath volumes on the right mount points" do
52
52
mounts . each do |mount |
53
53
# mount destinations have to be unique, so use it to lookup the mount definition
54
- mount_def = mount_definitions . select { |md | md [ "mountPath" ] == mount . Destination } . first
55
- # use the mount definition name to lookup the volume by name
56
- volume_def = host_path_volume_definitions . select { |vd | vd [ "name" ] == mount_def [ "name" ] } . first
54
+ mount_def = mount_definitions . find { |md | md [ "mountPath" ] == mount . Destination }
55
+ expect ( mount_def ) . not_to be_nil
56
+ # use the mount definition name to lookup the volume definition by name
57
+ volume_def = host_path_volume_definitions . find { |vd | vd [ "name" ] == mount_def [ "name" ] }
58
+ expect ( volume_def ) . not_to be_nil
57
59
58
60
expect ( mount ) . to eq ( {
59
61
"Destination" => mount_def [ "mountPath" ] ,
60
62
"Mode" => mount_def [ "readOnly" ] ? "ro" : "rw" ,
61
63
"Propagation" => "rprivate" ,
62
64
"RW" => !mount_def [ "readOnly" ] ,
63
- "Source" => volume_definition [ "hostPath" ] [ "path" ] ,
65
+ "Source" => volume_def [ "hostPath" ] [ "path" ] ,
64
66
"Type" => "bind" ,
65
67
} )
66
68
end
You can’t perform that action at this time.
0 commit comments