This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BeforeAll | |
public static void beforeAll(@WireMockInstance WireMockServer server1, @WireMockInstance WireMockServer server2) { | |
zephyrWiremockServer = server1; | |
slackWiremockServer = server2; | |
zephyrWiremockServer.addMockServiceRequestListener(new RequestListener() { | |
@Override | |
public void requestReceived(Request request, Response response) { | |
// if we would fail directly here in listener, JUnit error would be really hard to understand (as no response would be generated) | |
// therefore saving the value to assert it later in main test flow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppIntegrationTestPropertyInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> { | |
@Override | |
public void initialize(ConfigurableApplicationContext applicationContext) { | |
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(applicationContext, | |
"zephyr.api.baseUrl=" | |
+ String.format("%s/jira/rest/zapi/latest", | |
IntegrationTest.zephyrWiremockServer.baseUrl())); | |
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(applicationContext, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options; | |
import org.junit.jupiter.api.extension.AfterAllCallback; | |
import org.junit.jupiter.api.extension.AfterEachCallback; | |
import org.junit.jupiter.api.extension.ExtensionContext; | |
import org.junit.jupiter.api.extension.ParameterContext; | |
import org.junit.jupiter.api.extension.ParameterResolutionException; | |
import org.junit.jupiter.api.extension.ParameterResolver; | |
import com.github.tomakehurst.wiremock.WireMockServer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import lombok.RequiredArgsConstructor; | |
@RestController | |
@RequestMapping("/api/v1") | |
@RequiredArgsConstructor | |
public class Controller { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FeignClient(name = "Slack", url = "${slack.baseUrl}", configuration = SlackFeignClientConfiguration.class) | |
public interface SlackFeignClient { | |
@RequestMapping( | |
value = "/chat.postMessage", | |
method = RequestMethod.POST, | |
consumes = "application/json", | |
produces = "application/json") | |
SlackMessageResponseDto postSlackMessage( | |
@RequestBody(required = true) SlackMessageRequestDto messageRequest); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FeignClient(name = "Zephyr", url = "${zephyr.api.baseUrl}", configuration = ZephyrFeignClientConfiguration.class) | |
public interface ZephyrFeignClient { | |
@RequestMapping( | |
value = "/execution", | |
method = RequestMethod.GET) | |
ExecutionListResponseDto getListOfExecutions( | |
@RequestParam(name = "issueId") String issueId); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Template to create OKTA auth application load balancer. | |
Parameters: | |
CertificateArn: | |
Type: String | |
Description: ARN of certificate to use on HTTPS listener | |
authorizationEndpoint: | |
Type: String | |
Description: Okta account endpoint | |
Default: https://dev-12345.okta.com/oauth2/default/v1/authorize |