use of com.netflix.simianarmy.aws.conformity.crawler.AWSClusterCrawler in project SimianArmy by Netflix.
the class TestASGOwnerEmailTag method testForOwnerTag.
@Test
public void testForOwnerTag() {
Properties properties = new Properties();
BasicConformityMonkeyContext ctx = new BasicConformityMonkeyContext();
List<AutoScalingGroup> asgList = createASGList();
String[] asgNames = { ASG1, ASG2 };
AWSClient awsMock = createMockAWSClient(asgList, asgNames);
Map<String, AWSClient> regionToAwsClient = Maps.newHashMap();
regionToAwsClient.put("us-east-1", awsMock);
AWSClusterCrawler clusterCrawler = new AWSClusterCrawler(regionToAwsClient, new BasicConfiguration(properties));
List<Cluster> clusters = clusterCrawler.clusters(asgNames);
Assert.assertTrue(OWNER_TAG_VALUE.equalsIgnoreCase(clusters.get(0).getOwnerEmail()));
Assert.assertNull(clusters.get(1).getOwnerEmail());
}
Aggregations