use of com.synopsys.integration.alert.performance.utility.IntegrationPerformanceTestRunner in project hub-alert by blackducksoftware.
the class JiraServerPerformanceTest method createTestRunner.
private IntegrationPerformanceTestRunner createTestRunner() {
AlertRequestUtility alertRequestUtility = IntegrationPerformanceTestRunner.createAlertRequestUtility(webApplicationContext);
BlackDuckProviderService blackDuckProviderService = new BlackDuckProviderService(alertRequestUtility, gson);
ConfigurationManager configurationManager = new ConfigurationManager(gson, alertRequestUtility, blackDuckProviderService.getBlackDuckProviderKey(), CHANNEL_KEY.getUniversalKey());
return new IntegrationPerformanceTestRunner(gson, dateTimeFormatter, alertRequestUtility, blackDuckProviderService, configurationManager);
}
use of com.synopsys.integration.alert.performance.utility.IntegrationPerformanceTestRunner in project hub-alert by blackducksoftware.
the class JiraServerPerformanceTest method jiraServerJobTest.
@Test
@Disabled
public void jiraServerJobTest() throws Exception {
TestProperties testProperties = new TestProperties();
FieldModel globalConfig = createGlobalConfig(testProperties);
// Install plugin
ActionResponse<String> actionResponse = jiraServerCustomFunctionAction.createActionResponse(globalConfig, null);
if (actionResponse.isError()) {
fail("Unable to install the Alert plugin for Jira Server. Exiting test...");
}
Map<String, FieldValueModel> channelFieldsMap = createChannelFieldsMap(testProperties);
IntegrationPerformanceTestRunner testRunner = createTestRunner();
testRunner.runTest(globalConfig, channelFieldsMap, PERFORMANCE_JOB_NAME);
}
use of com.synopsys.integration.alert.performance.utility.IntegrationPerformanceTestRunner in project hub-alert by blackducksoftware.
the class JiraCloudPerformanceTest method createTestRunner.
private IntegrationPerformanceTestRunner createTestRunner() {
AlertRequestUtility alertRequestUtility = IntegrationPerformanceTestRunner.createAlertRequestUtility(webApplicationContext);
BlackDuckProviderService blackDuckProviderService = new BlackDuckProviderService(alertRequestUtility, gson);
ConfigurationManager configurationManager = new ConfigurationManager(gson, alertRequestUtility, blackDuckProviderService.getBlackDuckProviderKey(), CHANNEL_KEY.getUniversalKey());
return new IntegrationPerformanceTestRunner(gson, dateTimeFormatter, alertRequestUtility, blackDuckProviderService, configurationManager);
}
use of com.synopsys.integration.alert.performance.utility.IntegrationPerformanceTestRunner in project hub-alert by blackducksoftware.
the class EmailPerformanceTest method testEmailJob.
@Test
@Ignore
@Disabled
public void testEmailJob() throws Exception {
AlertRequestUtility alertRequestUtility = IntegrationPerformanceTestRunner.createAlertRequestUtility(webApplicationContext);
BlackDuckProviderService blackDuckProviderService = new BlackDuckProviderService(alertRequestUtility, gson);
ConfigurationManager configurationManager = new ConfigurationManager(gson, alertRequestUtility, blackDuckProviderService.getBlackDuckProviderKey(), EMAIL_CHANNEL_KEY);
IntegrationPerformanceTestRunner integrationPerformanceTestRunner = new IntegrationPerformanceTestRunner(gson, dateTimeFormatter, alertRequestUtility, blackDuckProviderService, configurationManager);
Map<String, FieldValueModel> emailGlobalConfigFields = new HashMap<>();
emailGlobalConfigFields.put(EmailPropertyKeys.JAVAMAIL_HOST_KEY.getPropertyKey(), new FieldValueModel(List.of(EMAIL_SMTP_HOST), true));
emailGlobalConfigFields.put(EmailPropertyKeys.JAVAMAIL_FROM_KEY.getPropertyKey(), new FieldValueModel(List.of(EMAIL_SMTP_FROM), true));
emailGlobalConfigFields.put(FieldModelTestAction.KEY_DESTINATION_NAME, new FieldValueModel(List.of(EMAIL_RECIPIENT), true));
FieldModel emailGlobalConfig = new FieldModel(EMAIL_CHANNEL_KEY, ConfigContextEnum.GLOBAL.name(), emailGlobalConfigFields);
Map<String, FieldValueModel> emailJobFields = new HashMap<>();
emailJobFields.put(ChannelDescriptor.KEY_ENABLED, new FieldValueModel(List.of("true"), true));
emailJobFields.put(ChannelDescriptor.KEY_CHANNEL_NAME, new FieldValueModel(List.of(EMAIL_CHANNEL_KEY), true));
emailJobFields.put(ChannelDescriptor.KEY_NAME, new FieldValueModel(List.of(EMAIL_PERFORMANCE_JOB_NAME), true));
emailJobFields.put(ChannelDescriptor.KEY_FREQUENCY, new FieldValueModel(List.of(FrequencyType.REAL_TIME.name()), true));
emailJobFields.put(ChannelDescriptor.KEY_PROVIDER_TYPE, new FieldValueModel(List.of(blackDuckProviderService.getBlackDuckProviderKey()), true));
emailJobFields.put(EmailDescriptor.KEY_SUBJECT_LINE, new FieldValueModel(List.of(EMAIL_PERFORMANCE_JOB_NAME), true));
emailJobFields.put(EmailDescriptor.KEY_EMAIL_ADDITIONAL_ADDRESSES_ONLY, new FieldValueModel(List.of("true"), true));
emailJobFields.put(EmailDescriptor.KEY_EMAIL_ADDITIONAL_ADDRESSES, new FieldValueModel(List.of(EMAIL_RECIPIENT), true));
integrationPerformanceTestRunner.runTest(emailGlobalConfig, emailJobFields, EMAIL_PERFORMANCE_JOB_NAME);
}
use of com.synopsys.integration.alert.performance.utility.IntegrationPerformanceTestRunner in project hub-alert by blackducksoftware.
the class JiraCloudPerformanceTest method jiraCloudJobTest.
@Test
@Disabled
public void jiraCloudJobTest() throws Exception {
TestProperties testProperties = new TestProperties();
FieldModel globalConfig = createGlobalConfig(testProperties);
// Install plugin
ActionResponse<String> actionResponse = jiraCloudCustomFunctionAction.createActionResponse(globalConfig, null);
if (actionResponse.isError()) {
fail("Unable to install the Alert plugin for Jira Cloud. Exiting test...");
}
Map<String, FieldValueModel> channelFieldsMap = createChannelFieldsMap(testProperties);
IntegrationPerformanceTestRunner testRunner = createTestRunner();
testRunner.runTest(globalConfig, channelFieldsMap, JIRA_CLOUD_PERFORMANCE_JOB_NAME);
}
Aggregations