Package com.puppetlabs.geppetto.validation.runner

Examples of com.puppetlabs.geppetto.validation.runner.PuppetCatalogCompilerRunner$CatalogDiagnostic


  public void testCatalogCompilation() throws IOException {
    File manifest = TestDataProvider.getTestFile("testData/test-manifest.pp");
    File modulePath = TestDataProvider.getTestFile("testData/test-modules/");
    File factsFile = TestDataProvider.getTestFile("testData/test-node-facts.yaml");

    PuppetCatalogCompilerRunner compiler = new PuppetCatalogCompilerRunner();
    int result = compiler.compileCatalog(
      manifest, modulePath, "test-node", factsFile, SubMonitor.convert(null, 10000));
    assertEquals("Should have 0 exit status", 0, result);
    List<CatalogDiagnostic> diagnostics = compiler.getDiagnostics();
    assertEquals("Should have found n diagnostics", 0, diagnostics.size());
  }
View Full Code Here


    int severity = diagnostics.getSeverity();
    if(ticker.isCanceled() || severity > Diagnostic.WARNING)
      return;

    // perform a catalog production
    PuppetCatalogCompilerRunner runner = new PuppetCatalogCompilerRunner();
    runner.compileCatalog(siteFile, catalogRoot, nodeName, factorData, ticker.newChild(1000));
    diagnostics.addChildren(runner.getDiagnostics());
  }
View Full Code Here

   * @throws IOException
   */
  @Test
  public void catalogCompilerRunner() throws IOException {
    File script = TestDataProvider.getTestFile("testData/mock-output.sh");
    PuppetCatalogCompilerRunner compiler = new PuppetCatalogCompilerRunner(script.getAbsolutePath());
    int result = compiler.compileCatalog(
      new File("foo"), null, "bar", new File("baz"), SubMonitor.convert(null, 10000));
    assertEquals("Should have 0 exit status", 0, result);
    List<CatalogDiagnostic> diagnostics = compiler.getDiagnostics();
    assertEquals("Should have found n diagnostics", 3, diagnostics.size());
    int i = 1;
    boolean parseErrorSeen = false;
    for(CatalogDiagnostic d : diagnostics) {
      String s = d.getFile().getName();
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.validation.runner.PuppetCatalogCompilerRunner$CatalogDiagnostic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.