Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ public void testValidateConfigurations__hostGroupConfigForNameNodeHAPositive() t
Configuration group2Configuration = new Configuration(group2Props, EMPTY_ATTRIBUTES, configuration);
expect(group2.getConfiguration()).andReturn(group2Configuration).atLeastOnce();

org.apache.ambari.server.configuration.Configuration serverConfig = setupConfigurationWithGPLLicense(true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may make sense to convert serverConfig to a member variable initialized in setup().


expect(group1.getCardinality()).andReturn("1").atLeastOnce();
expect(group1.getComponents()).andReturn(Arrays.asList(new Component("NAMENODE"),new Component("ZKFC"))).atLeastOnce();
expect(group2.getCardinality()).andReturn("1").atLeastOnce();
Expand All @@ -198,13 +200,13 @@ public void testValidateConfigurations__hostGroupConfigForNameNodeHAPositive() t
properties.put("hadoop-env", hadoopProps);
hadoopProps.put("dfs_ha_initial_namenode_active", "%HOSTGROUP::group1%");
hadoopProps.put("dfs_ha_initial_namenode_standby", "%HOSTGROUP::group2%");
replay(stack, group1, group2);
replay(stack, group1, group2, serverConfig);

Blueprint blueprint = new BlueprintImpl("test", hostGroups, stack, configuration, null);
blueprint.validateRequiredProperties();
BlueprintEntity entity = blueprint.toEntity();

verify(stack, group1, group2);
verify(stack, group1, group2, serverConfig);
assertTrue(entity.getSecurityType() == SecurityType.NONE);
assertTrue(entity.getSecurityDescriptorReference() == null);
}
Expand Down