use of com.google.cloud.secretmanager.v1.Secret in project java-docs-samples by GoogleCloudPlatform.
the class SnippetsIT method testDestroySecretVersionWithEtag.
@Test
public void testDestroySecretVersionWithEtag() throws IOException {
SecretVersionName name = SecretVersionName.parse(TEST_SECRET_VERSION_TO_DESTROY_WITH_ETAG.getName());
String etag = TEST_SECRET_VERSION_TO_DESTROY_WITH_ETAG.getEtag();
DestroySecretVersionWithEtag.destroySecretVersion(name.getProject(), name.getSecret(), name.getSecretVersion(), etag);
assertThat(stdOut.toString()).contains("Destroyed secret version");
}
use of com.google.cloud.secretmanager.v1.Secret in project java-docs-samples by GoogleCloudPlatform.
the class SnippetsIT method testDeleteSecretWithEtag.
@Test
public void testDeleteSecretWithEtag() throws IOException {
SecretName name = SecretName.parse(TEST_SECRET_TO_DELETE_WITH_ETAG.getName());
String etag = TEST_SECRET_TO_DELETE_WITH_ETAG.getEtag();
DeleteSecretWithEtag.deleteSecret(name.getProject(), name.getSecret(), etag);
assertThat(stdOut.toString()).contains("Deleted secret");
}
use of com.google.cloud.secretmanager.v1.Secret in project java-docs-samples by GoogleCloudPlatform.
the class SnippetsIT method testDisableSecretVersionWithEtag.
@Test
public void testDisableSecretVersionWithEtag() throws IOException {
SecretVersionName name = SecretVersionName.parse(TEST_SECRET_VERSION_TO_DISABLE_WITH_ETAG.getName());
String etag = TEST_SECRET_VERSION_TO_DISABLE_WITH_ETAG.getEtag();
DisableSecretVersionWithEtag.disableSecretVersion(name.getProject(), name.getSecret(), name.getSecretVersion(), etag);
assertThat(stdOut.toString()).contains("Disabled secret version");
}
use of com.google.cloud.secretmanager.v1.Secret in project java-docs-samples by GoogleCloudPlatform.
the class SnippetsIT method testEnableSecretVersion.
@Test
public void testEnableSecretVersion() throws IOException {
SecretVersionName name = SecretVersionName.parse(TEST_SECRET_VERSION_TO_ENABLE.getName());
EnableSecretVersion.enableSecretVersion(name.getProject(), name.getSecret(), name.getSecretVersion());
assertThat(stdOut.toString()).contains("Enabled secret version");
}
use of com.google.cloud.secretmanager.v1.Secret in project java-docs-samples by GoogleCloudPlatform.
the class SnippetsIT method testEnableSecretVersionWithEtag.
@Test
public void testEnableSecretVersionWithEtag() throws IOException {
SecretVersionName name = SecretVersionName.parse(TEST_SECRET_VERSION_TO_ENABLE_WITH_ETAG.getName());
String etag = TEST_SECRET_VERSION_TO_ENABLE_WITH_ETAG.getEtag();
EnableSecretVersionWithEtag.enableSecretVersion(name.getProject(), name.getSecret(), name.getSecretVersion(), etag);
assertThat(stdOut.toString()).contains("Enabled secret version");
}
Aggregations