use of com.mercedesbenz.sechub.test.executorconfig.TestExecutorConfigListEntry in project sechub by mercedes-benz.
the class AsUser method ensureExecutorConfigUUIDs.
void ensureExecutorConfigUUIDs(TestExecutorConfig executorConfig) {
if (executorConfig.uuid != null) {
return;
}
LOG.warn("The executor config:" + executorConfig.name + " had no UUID - this can happen when starting an integration test again when executor config already exists and not recreated. So load list of executor configurations and try to resolve the config. But be aware! Ensure names of configurations are unique here so it's really the config you wanted");
TestExecutorConfigList list = fetchProductExecutorConfigList();
for (TestExecutorConfigListEntry entry : list.executorConfigurations) {
if (executorConfig.name.equals(entry.name)) {
executorConfig.uuid = entry.uuid;
break;
}
}
}
use of com.mercedesbenz.sechub.test.executorconfig.TestExecutorConfigListEntry in project sechub by mercedes-benz.
the class ProductExecutorConfigurationScenario7IntTest method an_admin_can_fetch_product_configuration_list.
@Test
public void an_admin_can_fetch_product_configuration_list() {
/* prepare */
TestExecutorConfig config = new TestExecutorConfig();
config.productIdentifier = TestExecutorProductIdentifier.PDS_CODESCAN.name();
config.name = "pds gosec-forlist-check";
config.executorVersion = 1;
config.enabled = true;
config.setup.baseURL = "https://baseurl.product.example.com/start";
UUID uuid = as(SUPER_ADMIN).createProductExecutorConfig(config);
assertNotNull(uuid);
/* execute */
TestExecutorConfigList result = as(SUPER_ADMIN).fetchProductExecutorConfigList();
/* test */
TestExecutorConfigListEntry found = resolveEntry(uuid, result);
if (found == null) {
fail("Did not found an config list entry with uuid:" + uuid + "\n" + JSONConverter.get().toJSON(result, true));
}
assertEquals("pds gosec-forlist-check", found.name);
assertTrue(found.enabled);
}
Aggregations