Package com.openshift.client.utils

Examples of com.openshift.client.utils.SSHPublicKeyAssertion


      String keyName = SSHKeyTestUtils.createRandomKeyName();
      key = user.addSSHKey(keyName, publicKey);

      // verifications
      assertThat(
          new SSHPublicKeyAssertion(key))
          .hasName(keyName)
          .hasPublicKey(publicKey.getPublicKey())
          .isType(publicKey.getKeyType());
      List<IOpenShiftSSHKey> keys = user.getSSHKeys();
      assertThat(keys.size()).isEqualTo(numOfKeys + 1);
View Full Code Here


      // verification
      assertThat(key.getPublicKey()).isEqualTo(publicKey);
      IOpenShiftSSHKey openshiftKey = user.getSSHKeyByName(keyName);
      assertThat(
          new SSHPublicKeyAssertion(openshiftKey))
          .hasName(keyName)
          .hasPublicKey(publicKey)
          .isType(openshiftKey.getKeyType());
    } finally {
      SSHKeyTestUtils.silentlyDestroyKey(key);
View Full Code Here

    // operation
    List<IOpenShiftSSHKey> sshKeys = user.getSSHKeys();
    // verifications
    assertThat(sshKeys).hasSize(2);
    assertThat(new SSHPublicKeyAssertion(sshKeys.get(0)))
        .hasName("default").hasPublicKey("ABBA").isType(SSHKeyTestUtils.SSH_RSA);
    assertThat(new SSHPublicKeyAssertion(sshKeys.get(1)))
        .hasName("default2").hasPublicKey("AABB").isType(SSHKeyTestUtils.SSH_DSA);
  }
View Full Code Here

    mockDirector.mockGetKeys(Samples.GET_USER_KEYS_1KEY);

    // verifications
    List<IOpenShiftSSHKey> keys = user.getSSHKeys();
    assertThat(keys).hasSize(1);
    assertThat(new SSHPublicKeyAssertion(keys.get(0)))
        .hasName(keyName)
        .hasPublicKey("BBCC")
        .isType(SSHKeyTestUtils.SSH_DSA);
  }
View Full Code Here

TOP

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

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.