Search in sources :

Example 1 with GetSecretVersionRequest

use of com.google.cloud.secretmanager.v1beta1.GetSecretVersionRequest in project java-secretmanager by googleapis.

the class ITSystemTest method getSecretVersionTest.

@Test
public void getSecretVersionTest() {
    GetSecretVersionRequest request = GetSecretVersionRequest.newBuilder().setName(formattedSecretVersion).build();
    SecretVersion actualSecretVersion = client.getSecretVersion(request);
    assertEquals(secretVersion.getName(), actualSecretVersion.getName());
    assertEquals(secretVersion.getCreateTime(), actualSecretVersion.getCreateTime());
    assertEquals(SecretVersion.State.ENABLED, actualSecretVersion.getState());
}
Also used : GetSecretVersionRequest(com.google.cloud.secretmanager.v1beta1.GetSecretVersionRequest) SecretVersion(com.google.cloud.secretmanager.v1beta1.SecretVersion) Test(org.junit.Test)

Aggregations

GetSecretVersionRequest (com.google.cloud.secretmanager.v1beta1.GetSecretVersionRequest)1 SecretVersion (com.google.cloud.secretmanager.v1beta1.SecretVersion)1 Test (org.junit.Test)1