public void testVirtEnt() throws Exception { UserTestUtils.addUserRole(user, RoleFactory.ACTIVATION_KEY_ADMIN); UserTestUtils.addVirtualization(user.getOrg()); Channel baseChannel = ChannelTestUtils.createBaseChannel(user); Channel[] channels = ChannelTestUtils.setupBaseChannelForVirtualization(user, baseChannel); checkVirtEnt( ServerConstants.getServerGroupTypeVirtualizationEntitled(), channels[ChannelTestUtils.VIRT_INDEX], channels[ChannelTestUtils.TOOLS_INDEX]); }
public void testDeployConfig() throws Exception { UserTestUtils.addUserRole(user, RoleFactory.ACTIVATION_KEY_ADMIN); // need a tools channel for config deploy Channel base = ChannelTestUtils.createBaseChannel(user); ChannelTestUtils.setupBaseChannelForVirtualization(user, base); ActivationKey key = createActivationKey(); // Create a config channel ConfigChannel cc = ConfigTestUtils.createConfigChannel(user.getOrg()); ConfigChannelListProcessor proc = new ConfigChannelListProcessor(); proc.add(key.getConfigChannelsFor(user), cc); key.setDeployConfigs(true); ActivationKeyFactory.save(key); assertTrue(key.getDeployConfigs()); assertFalse(key.getChannels().isEmpty()); assertFalse(key.getPackages().isEmpty()); }