Пример #1
0
 @Before
 public void setUp() throws Exception {
   ForgeService forgeService = ForgeFactory.eINSTANCE.createForgeService();
   fixture =
       forgeService.createForge(
           URI.create("http://forge.puppetlabs.com"),
           ForgeTests.getTestOutputFolder("cache", false));
 }
Пример #2
0
 @Test
 public void testCreateCache__File_Repository() {
   try {
     Repository repository = fixture.createRepository(URI.create("http://forge.puppetlabs.com"));
     File cacheFolder = ForgeTests.getTestOutputFolder("cachefolder", true);
     assertNotNull(fixture.createCache(cacheFolder, repository));
   } catch (IOException e) {
     fail(e.getMessage());
   }
 }
Пример #3
0
 @Test
 public void testGenerate__File_Metadata() {
   try {
     ForgeService service = ForgeFactory.eINSTANCE.createForgeService();
     Metadata metadata = service.createMetadata("cloudsmith/testmodule");
     File installFolder = ForgeTests.getTestOutputFolder("testmodule-install", true);
     installFolder.delete();
     fixture.generate(installFolder, metadata);
   } catch (IOException e) {
     fail(e.getMessage());
   }
 }
Пример #4
0
 @Test
 public void testLoadModule__File() {
   try {
     Metadata md = fixture.loadModule(Activator.getTestData("puppetlabs-apache"));
     assertEquals("Unexpected module name", "puppetlabs-apache", md.getFullName());
   } catch (IOException e) {
     fail(e.getMessage());
   }
 }
Пример #5
0
 @Test
 public void testLoadModule__File2() {
   try {
     Metadata md = fixture.loadModule(Activator.getTestData("DavidSchmitt-collectd"));
     assertEquals("Unexpected module name", "DavidSchmitt-collectd", md.getFullName());
   } catch (IOException e) {
     fail(e.getMessage());
   }
 }
Пример #6
0
 @Test
 public void testCreateForge__URI_File() {
   try {
     assertNotNull(
         fixture.createForge(
             URI.create("http://forge.puppetlabs.com"),
             ForgeTests.getTestOutputFolder("cachefolder", true)));
   } catch (IOException e) {
     fail(e.getMessage());
   }
 }
Пример #7
0
 @Test
 public void testCreateRepository__URI() {
   assertNotNull(fixture.createRepository(URI.create("http://forge.puppetlabs.com")));
 }
Пример #8
0
 @Test
 public void testCreateMetadata__String() {
   assertNotNull(fixture.createMetadata("cloudsmith/testmodule"));
 }