use of com.synopsys.integration.alert.test.common.TestProperties in project hub-alert by blackducksoftware.
the class SlackPerformanceTest method initTest.
@BeforeAll
public static void initTest() {
TestProperties testProperties = new TestProperties();
SLACK_CHANNEL_WEBHOOK = testProperties.getProperty(TestPropertyKey.TEST_SLACK_WEBHOOK);
SLACK_CHANNEL_NAME = testProperties.getProperty(TestPropertyKey.TEST_SLACK_CHANNEL_NAME);
SLACK_CHANNEL_USERNAME = testProperties.getProperty(TestPropertyKey.TEST_SLACK_USERNAME);
}
use of com.synopsys.integration.alert.test.common.TestProperties 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.test.common.TestProperties in project hub-alert by blackducksoftware.
the class JiraServerSummaryFieldLengthTestIT method createJiraServerMessageSender.
private static IssueTrackerMessageSender<String> createJiraServerMessageSender() throws AlertException {
TestProperties testProperties = new TestProperties();
Gson gson = new GsonBuilder().create();
IssueCategoryRetriever issueCategoryRetriever = new IssueCategoryRetriever();
JiraServerMessageSenderFactory jiraServerMessageSenderFactory = new JiraServerMessageSenderFactory(gson, ChannelKeys.JIRA_SERVER, createJiraServerPropertiesFactory(testProperties), new IssueTrackerCallbackInfoCreator(), issueCategoryRetriever);
JiraServerJobDetailsModel jiraServerJobDetails = createJiraServerJobDetails(testProperties);
return jiraServerMessageSenderFactory.createMessageSender(jiraServerJobDetails);
}
use of com.synopsys.integration.alert.test.common.TestProperties in project hub-alert by blackducksoftware.
the class MsTeamsChannelTest method init.
@BeforeEach
public void init() {
gson = new Gson();
properties = new TestProperties();
}
use of com.synopsys.integration.alert.test.common.TestProperties in project hub-alert by blackducksoftware.
the class EmailGlobalTestActionTest method testPermissionConfigITTest.
@Test
@Tags(value = { @Tag(TestTags.DEFAULT_INTEGRATION), @Tag(TestTags.CUSTOM_EXTERNAL_CONNECTION) })
public void testPermissionConfigITTest() {
AuthorizationManager authorizationManager = createAuthorizationManager(AuthenticationTestUtils.FULL_PERMISSIONS);
EmailGlobalConfigurationValidator validator = new EmailGlobalConfigurationValidator();
TestProperties testProperties = new TestProperties();
String emailAddress = testProperties.getProperty(TestPropertyKey.TEST_EMAIL_RECIPIENT);
JavamailPropertiesFactory javamailPropertiesFactory = new JavamailPropertiesFactory();
EmailChannelMessagingService validEmailChannelMessagingService = createValidEmailChannelMessagingService(emailAddress);
EmailGlobalTestAction emailGlobalTestAction = new EmailGlobalTestAction(authorizationManager, validator, validEmailChannelMessagingService, javamailPropertiesFactory, configurationAccessor);
EmailGlobalConfigModel globalConfigModel = createValidEmailGlobalConfigModel(testProperties);
ActionResponse<ValidationResponseModel> response = emailGlobalTestAction.testWithPermissionCheck(emailAddress, globalConfigModel);
assertEquals(HttpStatus.OK, response.getHttpStatus());
assertTrue(response.hasContent());
assertFalse(response.getContent().get().hasErrors(), "Expected the message result to not have errors");
}
Aggregations