use of com.google.cloud.secretmanager.v1.SecretName in project java-secretmanager by googleapis.
the class SnippetsIT method testIamGrantAccess.
@Test
public void testIamGrantAccess() throws IOException {
SecretName name = SecretName.parse(TEST_SECRET.getName());
new IamGrantAccess().iamGrantAccess(name.getProject(), name.getSecret(), IAM_USER);
assertThat(stdOut.toString()).contains("Updated IAM policy");
}
use of com.google.cloud.secretmanager.v1.SecretName in project java-secretmanager by googleapis.
the class SnippetsIT method testCreateSecret.
@Test
public void testCreateSecret() throws IOException {
SecretName name = TEST_SECRET_TO_CREATE_NAME;
new CreateSecret().createSecret(name.getProject(), name.getSecret());
assertThat(stdOut.toString()).contains("Created secret");
}
use of com.google.cloud.secretmanager.v1.SecretName in project java-secretmanager by googleapis.
the class SnippetsIT method testListSecrets.
@Test
public void testListSecrets() throws IOException {
SecretName name = SecretName.parse(TEST_SECRET.getName());
new ListSecrets().listSecrets(name.getProject());
assertThat(stdOut.toString()).contains("Secret projects/");
assertThat(stdOut.toString()).contains(name.getSecret());
}
use of com.google.cloud.secretmanager.v1.SecretName in project java-secretmanager by googleapis.
the class SnippetsIT method testUpdateSecret.
@Test
public void testUpdateSecret() throws IOException {
SecretName name = SecretName.parse(TEST_SECRET.getName());
new UpdateSecret().updateSecret(name.getProject(), name.getSecret());
assertThat(stdOut.toString()).contains("Updated secret");
}
Aggregations