Exemple #1
0
 @Test
 public void testPipelinesBadApiKey() throws Exception {
   try {
     new Janvil(new Config("BAD_API_KEY").setProtocol(Config.Protocol.HTTP)).downstreams("java");
     fail();
   } catch (JanvilRuntimeException e) {
     assertEquals(e.getMessage(), "Heroku API key not found or invalid");
   }
 }
Exemple #2
0
 @Test
 public void testPipelinesNoAppAccess_WithBody() throws Exception {
   try {
     janvil.copy("java", "java", "no access with body");
     fail();
   } catch (JanvilRuntimeException e) {
     assertEquals(e.getMessage(), "No access to app java");
   }
 }
Exemple #3
0
 @Test
 public void testBambooNotAllowed() throws Exception {
   try {
     janvil.copy(BAMBOO_192, BAMBOO_192, "");
     fail();
   } catch (JanvilRuntimeException e) {
     assertTrue(e.getMessage().contains("using an unsupported stack bamboo-mri-1.9.2"));
   }
 }
Exemple #4
0
 @Test
 public void testPipelinesNoAppAccess_Async() throws Exception {
   try {
     janvil.promote("java");
     fail();
   } catch (JanvilRuntimeException e) {
     assertEquals(e.getMessage(), "No access to app java");
   }
 }