Skip to content

Commit

Permalink
Update config/permissions.tmpl.yml to contain all values.
Browse files Browse the repository at this point in the history
Also sorted it because it was impossible to compare otherwise.  The
actual added values are

- ems-type:ansible_tower_configuration
- ems-type:azure_network
- ems-type:ec2_network
- ems-type:hawkular
  • Loading branch information
Fryguy committed Apr 22, 2016
1 parent e0c0032 commit bdcfb60
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 20 deletions.
40 changes: 22 additions & 18 deletions config/permissions.tmpl.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
---
- :vi
- :aut
- :clo
- :cnt
- :compute
- :con
- :conf
- :svc
- :clo
- :inf
- :con
- :cnt
- :sto
- :mdl
- :net
- :aut
- :opt
- :set
- ems-type:foreman_configuration
- ems-type:scvmm
- ems-type:openstack_infra
- ems-type:openstack_network
- ems-type:rhevm
- ems-type:vmwarews
- :sto
- :svc
- :vi
- ems-type:ansible_tower_configuration
- ems-type:atomic
- ems-type:atomic_enterprise
- ems-type:azure
- ems-type:azure_network
- ems-type:ec2
- ems-type:openstack
- ems-type:ec2_network
- ems-type:foreman_configuration
- ems-type:foreman_provisioning
- ems-type:gce
- ems-type:hawkular
- ems-type:kubernetes
- ems-type:openshift
- ems-type:atomic
- ems-type:openshift_enterprise
- ems-type:atomic_enterprise
- ems-type:foreman_provisioning
- ems-type:gce
- ems-type:openstack
- ems-type:openstack_infra
- ems-type:openstack_network
- ems-type:rhevm
- ems-type:scvmm
- ems-type:vmwarews
19 changes: 17 additions & 2 deletions spec/models/ext_management_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,23 @@
expect(described_class.supported_types).to match_array(all_types_and_descriptions.keys)
end

it ".supported_types_and_descriptions_hash" do
expect(described_class.supported_types_and_descriptions_hash).to eq(all_types_and_descriptions)
describe ".supported_types_and_descriptions_hash" do
it "with default permissions" do
expect(described_class.supported_types_and_descriptions_hash).to eq(all_types_and_descriptions)
end

it "with removed permissions" do
stub_vmdb_permission_store_with_types(["ems-type:vmwarews"]) do
expect(described_class.supported_types_and_descriptions_hash).to eq("vmwarews" => "VMware vCenter")
end
end

it "permissions.tmpl.yml should contain all EMS types" do
types = YAML.load_file(Rails.root.join("config/permissions.tmpl.yml"))
stub_vmdb_permission_store_with_types(types) do
expect(described_class.supported_types_and_descriptions_hash).to eq(all_types_and_descriptions)
end
end
end

it ".ems_infra_discovery_types" do
Expand Down

0 comments on commit bdcfb60

Please sign in to comment.