use of bio.terra.buffer.common.exception.InvalidPoolConfigException in project terra-resource-buffer by DataBiosphere.
the class ResourceConfigValidatorTest method testValidateGcpConfig_prefixTooLong.
@Test
public void testValidateGcpConfig_prefixTooLong() {
ResourceConfig resourceConfig = new ResourceConfig().configName("testConfig").gcpProjectConfig(newValidGcpProjectConfig().projectIdSchema(new ProjectIdSchema().prefix("prefixlongerthan12characters").scheme(ProjectIdSchema.SchemeEnum.TWO_WORDS_NUMBER)));
InvalidPoolConfigException exception = assertThrows(InvalidPoolConfigException.class, () -> new GcpResourceConfigValidator().validate(resourceConfig));
assertTrue(exception.getMessage().contains("Project id prefix is too long for TWO_WORDS_NUMBER naming scheme"));
}
use of bio.terra.buffer.common.exception.InvalidPoolConfigException in project terra-resource-buffer by DataBiosphere.
the class ResourceConfigValidatorTest method testValidateGcpConfig_missingBillingAccount.
@Test
public void testValidateGcpConfig_missingBillingAccount() {
ResourceConfig resourceConfig = new ResourceConfig().configName("testConfig").gcpProjectConfig(newValidGcpProjectConfig().billingAccount(""));
InvalidPoolConfigException exception = assertThrows(InvalidPoolConfigException.class, () -> new GcpResourceConfigValidator().validate(resourceConfig));
assertTrue(exception.getMessage().contains("Missing billing account"));
}
Aggregations