use of org.bf2.operator.resources.v1alpha1.ServiceAccount in project yakc by manusa.
the class ServiceAccountIT method readNamespacedServiceAccount.
@Test
@DisplayName("readNamespacedServiceAccount, should read newly created ServiceAccount")
void readNamespacedServiceAccount() throws IOException {
// When
final ServiceAccount serviceAccountFromServer = KC.create(CoreV1Api.class).readNamespacedServiceAccount(serviceAccountName, NAMESPACE).get();
// Then
assertThat(serviceAccountFromServer).isNotNull().hasFieldOrPropertyWithValue("metadata.name", serviceAccountName).extracting(ServiceAccount::getSecrets).asList().hasSizeGreaterThanOrEqualTo(1).element(0).hasFieldOrPropertyWithValue("name", "doesnt-exist");
}
Aggregations