Search in sources :

Example 6 with BasicChaosMonkey

use of com.netflix.simianarmy.basic.chaos.BasicChaosMonkey in project SimianArmy by Netflix.

the class TestChaosMonkeyResource method testTerminateNowBadGroupNotExist.

@Test
void testTerminateNowBadGroupNotExist() {
    TestChaosMonkeyContext ctx = new TestChaosMonkeyContext("ondemandTermination.properties");
    String input = "{\"eventType\":\"CHAOS_TERMINATION\",\"groupType\":\"INVALID\",\"groupName\":\"name4\"}";
    ChaosMonkeyResource resource = new ChaosMonkeyResource(new BasicChaosMonkey(ctx));
    validateAddEventResult(resource, input, Response.Status.NOT_FOUND);
    input = "{\"eventType\":\"CHAOS_TERMINATION\",\"groupType\":\"TYPE_C\",\"groupName\":\"INVALID\"}";
    resource = new ChaosMonkeyResource(new BasicChaosMonkey(ctx));
    validateAddEventResult(resource, input, Response.Status.NOT_FOUND);
}
Also used : BasicChaosMonkey(com.netflix.simianarmy.basic.chaos.BasicChaosMonkey) TestChaosMonkeyContext(com.netflix.simianarmy.chaos.TestChaosMonkeyContext) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

BasicChaosMonkey (com.netflix.simianarmy.basic.chaos.BasicChaosMonkey)6 TestChaosMonkeyContext (com.netflix.simianarmy.chaos.TestChaosMonkeyContext)5 BeforeTest (org.testng.annotations.BeforeTest)5 Test (org.testng.annotations.Test)5 Properties (java.util.Properties)1