Ejemplo n.º 1
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");
   }
 }
Ejemplo n.º 2
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"));
   }
 }
Ejemplo n.º 3
0
 @Test
 public void testPipelinesNoAppAccess_Async() throws Exception {
   try {
     janvil.promote("java");
     fail();
   } catch (JanvilRuntimeException e) {
     assertEquals(e.getMessage(), "No access to app java");
   }
 }
Ejemplo n.º 4
0
 @Test
 public void testBuildFailure() throws Exception {
   Manifest m = new Manifest(dir);
   m.addAll();
   try {
     janvil.build(m, Collections.<String, String>emptyMap(), "INVALID_BUILDPACK");
     fail();
   } catch (JanvilBuildException e) {
     assertEquals(1, e.getExitStatus());
   }
 }