Search in sources :

Example 6 with AutoScalingInstanceDetails

use of com.amazonaws.services.autoscaling.model.AutoScalingInstanceDetails in project SimianArmy by Netflix.

the class TestInstanceJanitorCrawler method testInstancesNotExistingInASG.

@Test
public void testInstancesNotExistingInASG() {
    List<AutoScalingInstanceDetails> instanceDetailsList = Collections.emptyList();
    List<Instance> instanceList = createInstanceList();
    AWSClient awsMock = createMockAWSClient(instanceDetailsList, instanceList);
    InstanceJanitorCrawler crawler = new InstanceJanitorCrawler(awsMock);
    List<Resource> resources = crawler.resources();
    Assert.assertEquals(resources.size(), instanceList.size());
}
Also used : Instance(com.amazonaws.services.ec2.model.Instance) Resource(com.netflix.simianarmy.Resource) AWSResource(com.netflix.simianarmy.aws.AWSResource) AutoScalingInstanceDetails(com.amazonaws.services.autoscaling.model.AutoScalingInstanceDetails) AWSClient(com.netflix.simianarmy.client.aws.AWSClient) Test(org.testng.annotations.Test)

Aggregations

AutoScalingInstanceDetails (com.amazonaws.services.autoscaling.model.AutoScalingInstanceDetails)6 Instance (com.amazonaws.services.ec2.model.Instance)5 Resource (com.netflix.simianarmy.Resource)5 AWSResource (com.netflix.simianarmy.aws.AWSResource)5 AWSClient (com.netflix.simianarmy.client.aws.AWSClient)5 Test (org.testng.annotations.Test)4 Tag (com.amazonaws.services.ec2.model.Tag)1 AWSResourceType (com.netflix.simianarmy.aws.AWSResourceType)1 HashMap (java.util.HashMap)1 LinkedList (java.util.LinkedList)1