Examples of TestConnectionBuilder


Examples of com.openshift.client.utils.TestConnectionBuilder

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

Examples of com.openshift.client.utils.TestConnectionBuilder

    String token = authorization.getToken();
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);

    // operations
    IOpenShiftConnection connection =
        new TestConnectionBuilder().token(authorization.getToken()).create();
    authorization = connection.getUser().getAuthorization();

    // verifications
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);
    assertEquals(token, authorization.getToken());
View Full Code Here

Examples of com.openshift.client.utils.TestConnectionBuilder

    IAuthorization authorization = user.createAuthorization("my note", IAuthorization.SCOPE_SESSION);
    assertNotNull(authorization.getToken());

    // operations
    IOpenShiftConnection connection =
        new TestConnectionBuilder().token(authorization.getToken()).create();
    authorization = connection.getUser().getAuthorization();

    // verifications
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);
    assertEquals(authorization.getNote(), "my note");
View Full Code Here

Examples of com.openshift.client.utils.TestConnectionBuilder

    IAuthorization authorization = user.createAuthorization("my note", IAuthorization.SCOPE_SESSION, 600);
    assertNotNull(authorization.getToken());

    // operations
    IOpenShiftConnection connection =
        new TestConnectionBuilder().token(authorization.getToken()).create();
    authorization = connection.getUser().getAuthorization();

    // verifications
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);
    assertEquals(authorization.getNote(), "my note");
View Full Code Here

Examples of com.openshift.client.utils.TestConnectionBuilder

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

Examples of com.openshift.client.utils.TestConnectionBuilder

  private IDomain domain;
  private IUser user;

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

Examples of com.openshift.client.utils.TestConnectionBuilder

  private IDomain domain;
  private IApplication application;

  @Before
  public void setUp() throws Exception {
    IOpenShiftConnection connection = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create();
    this.user = connection.getUser();
    this.domain = DomainTestUtils.ensureHasDomain(user);
    ApplicationTestUtils.silentlyDestroyAllApplications(domain);
    this.application = ApplicationTestUtils.getOrCreateApplication(domain);
  }
View Full Code Here

Examples of com.openshift.client.utils.TestConnectionBuilder

  // TODO: add tests for expired tokens
  private IUser user;

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

Examples of com.openshift.client.utils.TestConnectionBuilder

    assertNotNull(authorization.getToken());
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);

    // operations
    IOpenShiftConnection connection =
        new TestConnectionBuilder().token(authorization.getToken()).disableSSLCertificateChecks().create();
    authorization = connection.getUser().getAuthorization();
   
    // verifications
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);
View Full Code Here

Examples of com.openshift.client.utils.TestConnectionBuilder

    assertNotNull(authorization.getToken());
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);

    // operations
    IOpenShiftConnection connection =
        new TestConnectionBuilder().token(authorization.getToken()).disableSSLCertificateChecks().create();
    authorization = connection.getUser().getAuthorization();

    // verifications
    assertEquals(authorization.getScopes(), IAuthorization.SCOPE_SESSION);
    assertEquals(authorization.getNote(), "my note");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.