Package org.eclipse.orion.server.cf.manifest.v2

Examples of org.eclipse.orion.server.cf.manifest.v2.Token


    String manifestName = "prod-manifest.yml"; //$NON-NLS-1$

    URL entry = ServerTestsActivator.getContext().getBundle().getEntry(MANIFEST_LOCATION);
    IFileStore fs = EFS.getStore(URIUtil.toURI(FileLocator.toFileURL(entry).getPath().concat(manifestName)));

    ManifestParseTree manifest = ManifestUtils.parse(fs.getParent(), fs);
    ManifestParseTree applications = manifest.get("applications"); //$NON-NLS-1$
    assertEquals(2, applications.getChildren().size());
  }
View Full Code Here


    String manifestName = "final-manifest.yml"; //$NON-NLS-1$

    URL entry = ServerTestsActivator.getContext().getBundle().getEntry(MANIFEST_LOCATION);
    IFileStore fs = EFS.getStore(URIUtil.toURI(FileLocator.toFileURL(entry).getPath().concat(manifestName)));

    ManifestParseTree manifest = ManifestUtils.parse(fs.getParent(), fs);
    ManifestParseTree applications = manifest.get("applications"); //$NON-NLS-1$
    assertEquals(2, applications.getChildren().size());

    for (ManifestParseTree application : applications.getChildren()) {
      assertTrue(application.has("domain")); //$NON-NLS-1$
      assertTrue(application.has("instances")); //$NON-NLS-1$
      assertTrue(application.has("memory")); //$NON-NLS-1$

      if ("A".equals(application.get("name").getValue())) //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

    String manifestName = "final-manifest.yml"; //$NON-NLS-1$

    URL entry = ServerTestsActivator.getContext().getBundle().getEntry(MANIFEST_LOCATION);
    IFileStore fs = EFS.getStore(URIUtil.toURI(FileLocator.toFileURL(entry).getPath().concat(manifestName)));

    ManifestParseTree manifest = ManifestUtils.parse(fs.getParent().getParent().getParent(), fs);
    ManifestParseTree applications = manifest.get("applications"); //$NON-NLS-1$
    assertEquals(2, applications.getChildren().size());

    for (ManifestParseTree application : applications.getChildren()) {
      assertTrue(application.has("domain")); //$NON-NLS-1$
      assertTrue(application.has("instances")); //$NON-NLS-1$
      assertTrue(application.has("memory")); //$NON-NLS-1$

      if ("A".equals(application.get("name").getValue())) //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

    String manifestName = "prod-manifest.yml"; //$NON-NLS-1$

    URL entry = ServerTestsActivator.getContext().getBundle().getEntry(MANIFEST_LOCATION);
    IFileStore fs = EFS.getStore(URIUtil.toURI(FileLocator.toFileURL(entry).getPath().concat(manifestName)));

    ManifestParseTree manifest = ManifestUtils.parse(fs.getParent(), fs);

    ManifestParseTree applications = manifest.get("applications"); //$NON-NLS-1$
    assertEquals(1, applications.getChildren().size());

    ManifestParseTree env = manifest.get("env"); //$NON-NLS-1$
    assertEquals(2, env.getChildren().size());

    assertEquals("base", env.get("TEST").getValue()); //$NON-NLS-1$//$NON-NLS-2$
    assertEquals("overridden", env.get("TEST2").getValue()); //$NON-NLS-1$//$NON-NLS-2$
  }
View Full Code Here

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

  private static String CORRECT_MANIFEST_LOCATION = "testData/manifestTest/correct"; //$NON-NLS-1$
  private static String INCORRECT_MANIFEST_LOCATION = "testData/manifestTest/incorrect"; //$NON-NLS-1$

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

    service = services.get(1).getValue();
    assertEquals("Redis-two", service); //$NON-NLS-1$
  }

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

  private static String INCORRECT_MANIFEST_LOCATION = "testData/manifestTest/incorrect"; //$NON-NLS-1$

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

  }

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.orion.server.cf.manifest.v2.Token

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.