Package com.openshift.client.utils

Examples of com.openshift.client.utils.TestConnectionBuilder


  private IUser user;

  @Before
  public void setUp() throws OpenShiftException, DatatypeConfigurationException, IOException {
    this.user = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
  }
View Full Code Here


    OpenShiftTestConfiguration configuration = new OpenShiftTestConfiguration();
    if (configuration.isDevelopmentServer()) {
      throw new InvalidCredentialsOpenShiftException(null, new HttpClientException(""), null);
    }

    new TestConnectionBuilder()
      .credentials(configuration.getClientId(), "bogus-password").create().getUser()
  }
View Full Code Here

  public void shouldNoDefaultDomainAfterRefresh() throws OpenShiftException, FileNotFoundException, IOException {
    // precondition
    IDomain domain = DomainTestUtils.ensureHasDomain(user);
    assertNotNull(domain);

    IUser otherUser = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
    DomainTestUtils.destroyAllDomains(otherUser);
    assertNull(otherUser.getDefaultDomain());
   
    // operation
    user.refresh();
View Full Code Here

  @Before
  public void setUp() throws OpenShiftException, FileNotFoundException, IOException {
    IHttpClient client = new HttpClientMockDirector()
        .mockGetCartridges(Samples.GET_CARTRIDGES)
        .client();
    this.connection = new TestConnectionBuilder().defaultCredentials().create(client);
  }
View Full Code Here

            "foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_3EMBEDDED)
        .mockGetApplicationCartridges(
            "foobarz", "springeap6",
            GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_CARTRIDGES_3EMBEDDED)
        .client();
    IUser user = new TestConnectionBuilder().defaultCredentials().create(client).getUser();
    IDomain domain = user.getDomain("foobarz");
    IApplication application = domain.getApplicationByName("springeap6");
    assertThat(application.getEmbeddedCartridges()).onProperty("name").contains("switchyard-0");

    // operation
View Full Code Here

  public IHttpClient client() {
    return client;
  }

  public IDomain getDomain(String string) throws OpenShiftException, FileNotFoundException, IOException {
    IUser user = new TestConnectionBuilder().defaultCredentials().create(client).getUser();
    return user.getDomain("foobarz");
  }
View Full Code Here

  @Before
  public void setup() throws Throwable {
    IHttpClient client = new HttpClientMockDirector()
        .mockGetCartridges(Samples.GET_CARTRIDGES)
        .client();
    this.connection = new TestConnectionBuilder().defaultCredentials().create(client);
  }
View Full Code Here

    this.mockDirector = new HttpClientMockDirector();
    this.clientMock = mockDirector
        .mockGetDomains(GET_DOMAINS)
        .mockGetApplications("foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_1EMBEDDED)
        .client();
    this.user = new TestConnectionBuilder().defaultCredentials().create(clientMock).getUser();
  }
View Full Code Here

    try {
      // pre-conditions
      mockDirector.mockGetAPI(
          new HttpClientException(new ConnectException("java.net.ConnectException: Connection timed out")));
      // operation
      new TestConnectionBuilder().defaultCredentials().create(clientMock);
      // verification
      fail("exception expected");
    } catch (OpenShiftEndpointException e) {
      // verification
      assertThat(e.getMessage()).contains("https://");
View Full Code Here

      .mockGetDomains(GET_DOMAINS)
      .mockGetApplications("foobarz", GET_DOMAINS_FOOBARZ_APPLICATIONS_1EMBEDDED)
      .mockGetApplication("foobarz", "springeap6", GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_1EMBEDDED)
      .mockGetGearGroups("foobarz", "springeap6", GET_DOMAINS_FOOBARZ_APPLICATIONS_SPRINGEAP6_GEARGROUPS)
      .client();
    IUser user = new TestConnectionBuilder().defaultCredentials().create(client).getUser();
    this.domain = user.getDomain("foobarz");
  }
View Full Code Here

TOP

Related Classes of com.openshift.client.utils.TestConnectionBuilder

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.