Package com.openshift.client

Examples of com.openshift.client.Messages


    assertThat(matchingMessages).isNotEmpty();
    return this;
  }

  public ApplicationAssert hasMessage(IField field) throws IOException {
    Messages messages = application.getMessages();
    assertThat(messages).isNotNull();
    List<Message> matchingMessages = messages.getBy(field);
    assertThat(matchingMessages).isNotEmpty();
    return this;
  }
View Full Code Here


    assertThat(matchingMessages).isNotEmpty();
    return this;
  }

  public ApplicationAssert hasResultFieldOrResultSeverityMessage() throws IOException {
    Messages messages = application.getMessages();
    assertThat(messages).isNotNull();
    List<Message> matchingMessages = messages.getBy(IField.RESULT);
    if (matchingMessages == null
        || matchingMessages.isEmpty()) {
      matchingMessages = messages.getBy(IField.DEFAULT, ISeverity.RESULT);
      assertThat(matchingMessages).isNotEmpty();
    }
    return this;
  }
View Full Code Here

      .mockGetApplications("foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_NOAPPS)
      .mockCreateApplication("foobarz", POST_JEKYLL_DOMAINS_FOOBARZ_APPLICATIONS);
    // operation
    final IApplication app = domain.createApplication("jekyll", CartridgeTestUtils.jenkins14());
    // verifications
    Messages messages = app.getMessages();
    assertThat(messages).isNotNull();
    assertThat(messages.getAll()).hasSize(3);
    List<Message> defaultMessages = messages.getBy(IField.DEFAULT);
    assertThat(defaultMessages).hasSize(3);
    List<Message> infoSeverityMessages = messages.getBy(IField.DEFAULT, ISeverity.INFO);
    assertThat(infoSeverityMessages).hasSize(1);
    new MessageAssert(infoSeverityMessages.get(0))
      .hasExitCode(0)
      .hasText("Application jekyll was created.");
    List<Message> debugSeverityMessages = app.getMessages().getBy(IField.DEFAULT, ISeverity.DEBUG);
    assertThat(debugSeverityMessages).hasSize(1);
    new MessageAssert(debugSeverityMessages.get(0))
      .hasExitCode(0)
      .hasText("The cartridge jenkins deployed a template application");
    List<Message> resultSeverityMessages = messages.getBy(IField.DEFAULT, ISeverity.RESULT);
    assertThat(resultSeverityMessages).hasSize(1);
    new MessageAssert(resultSeverityMessages.get(0))
        .hasExitCode(0)
        .hasText("Jenkins created successfully.  "
            + "Please make note of these credentials:\n   User: admin\n   Password: wLwSzJPh6dqN\n"
View Full Code Here

    // operation
    RestResponse response = factory.get(content);

    // verifications
    Messages messages = response.getMessages();
    assertThat(messages.size()).isEqualTo(3);
    Collection<Message> defaultMessages = messages.getBy(IField.DEFAULT);
    assertThat(defaultMessages).isNotEmpty();
    new MessageAssert(defaultMessages.iterator().next())
        .hasField(IField.DEFAULT)
        .hasExitCode(-1)
        .hasText("Added mysql-5.1 to application springeap6");
    Collection<Message> resultMessages = messages.getBy(IField.RESULT);
    assertThat(resultMessages).isNotEmpty();
    new MessageAssert(resultMessages.iterator().next())
        .hasField(IField.RESULT)
        .hasExitCode(0)
        .hasText(
            "\nMySQL 5.1 database added.  Please make note of these credentials:\n\n"
                + "       Root User: adminnFC22YQ\n   Root Password: U1IX8AIlrEcl\n   Database Name: springeap6\n\n"
                + "Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/\n\n"
                + "You can manage your new MySQL database by also embedding phpmyadmin-3.4.\n"
                + "The phpmyadmin username and password will be the same as the MySQL credentials above.\n");
    Collection<Message> appInfoMessages = messages.getBy(IField.APPINFO);
    assertThat(appInfoMessages).isNotEmpty();
    new MessageAssert(appInfoMessages.iterator().next())
        .hasField(IField.APPINFO)
        .hasExitCode(0)
        .hasText("Connection URL: mysql://127.13.125.1:3306/\n");
View Full Code Here

TOP

Related Classes of com.openshift.client.Messages

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.