@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"); } }
@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"); } }
@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")); } }
@Test public void testPipelinesNoAppAccess_Async() throws Exception { try { janvil.promote("java"); fail(); } catch (JanvilRuntimeException e) { assertEquals(e.getMessage(), "No access to app java"); } }