Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

Latest commit

 

History

History
46 lines (30 loc) · 1.34 KB

README.md

File metadata and controls

46 lines (30 loc) · 1.34 KB

Spring Cloud Contract AWS

spring-cloud-contract-aws helps you test your Spring Cloud AWS messaging interfaces together with Spring Cloud Contract. It provides the necessary auto-configuration so that your messages can be picked up and tested against your contracts without any fuss.

Currently these services are supported:

  • AWS SNS (outbound)
  • AWS SQS

This library is still in an early, experimental state.

Installation

tbd

Usage

AWS SNS

Spring Cloud Contract tests that verify a notification sent from your service to AWS SNS can be annotated with @AutoConfigureSNSVerifier, which takes the topics that should be registered as argument.

Example

@SpringBootTest
@AutoConfigureSNSVerifier({"your-topic-name"})
public abstract class SNSTestBase {
}

AWS SQS

Spring Cloud Contract tests that verify messaging sent via AWS SQS can be annotated with @AutoConfigureSQSVerifier, which takes the following arguments:

  • value - Queue names that should be registered
  • notificationInput - Whether the input message is formatted as notification (for queues that are filled via an SNS subscription) or not

Example

@SpringBootTest
@AutoConfigureSQSVerifier({"your-queue-name"})
public abstract class SQSTestBase {
}