All Projects → s12v → Sns

s12v / Sns

Licence: apache-2.0
Fake Amazon SNS

Programming Languages

scala
5932 projects

Labels

Projects that are alternatives of or similar to Sns

jest-ts-auto-mock
Jest test utility with automatic mock creation for interfaces and classes
Stars: ✭ 150 (+59.57%)
Mutual labels:  mock, fake
Openapi Sampler
🔠 Tool for generation samples based on OpenAPI(fka Swagger) payload/response schema
Stars: ✭ 83 (-11.7%)
Mutual labels:  fake, mock
Mockaco
🐵 HTTP mock server, useful to stub services and simulate dynamic API responses, leveraging ASP.NET Core features, built-in fake data generation and pure C# scripting
Stars: ✭ 213 (+126.6%)
Mutual labels:  mock, fake
Http Fake Backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 253 (+169.15%)
Mutual labels:  fake, mock
falso
All the Fake Data for All Your Real Needs 🙂
Stars: ✭ 877 (+832.98%)
Mutual labels:  mock, fake
ts-mock-imports
Intuitive mocking library for Typescript class imports
Stars: ✭ 103 (+9.57%)
Mutual labels:  mock, fake
better-mock
Forked from Mockjs, Generate random data & Intercept ajax request. Support miniprogram.
Stars: ✭ 140 (+48.94%)
Mutual labels:  mock, fake
Impersonator
Ruby library to record and replay object interactions
Stars: ✭ 100 (+6.38%)
Mutual labels:  fake, mock
stub-server
Stub server for REST APIs
Stars: ✭ 14 (-85.11%)
Mutual labels:  mock, fake
Stubmatic
Mock HTTP calls without coding. Designed specially for testing and testers.
Stars: ✭ 118 (+25.53%)
Mutual labels:  mock, fake
Fake Xrm Easy
The testing framework for Dynamics CRM and Dynamics 365 which runs on an In-Memory context and deals with mocks or fakes for you
Stars: ✭ 216 (+129.79%)
Mutual labels:  fake, mock
Generator Http Fake Backend
Yeoman generator for building a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 49 (-47.87%)
Mutual labels:  fake, mock
Ts Auto Mock
Typescript transformer to unlock automatic mock creation for interfaces and classes
Stars: ✭ 204 (+117.02%)
Mutual labels:  fake, mock
moq.ts
Moq for Typescript
Stars: ✭ 107 (+13.83%)
Mutual labels:  mock, fake
Wabbit
Golang AMQP mocking library
Stars: ✭ 137 (+45.74%)
Mutual labels:  fake, mock
fakey-json
This is a utility for mocking json data that pretends the api response data with JSON format.
Stars: ✭ 27 (-71.28%)
Mutual labels:  mock, fake
xrm-mock
📚 A fake implementation of the Xrm object model. Written in TypeScript against @types/xrm definitions.
Stars: ✭ 64 (-31.91%)
Mutual labels:  mock, fake
Mimesis
Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.
Stars: ✭ 3,439 (+3558.51%)
Mutual labels:  fake, mock
Fakerator
Random fake data generator with localization for Javascript in Node.js and browser
Stars: ✭ 91 (-3.19%)
Mutual labels:  fake, mock
Wp Cli Fixtures
Easily generate custom fake data for WordPress
Stars: ✭ 65 (-30.85%)
Mutual labels:  fake

Build Status codecov Docker Pulls

Fake SNS

Fake Amazon Simple Notification Service (SNS) for testing. Supports:

  • Create/List/Delete topics
  • Subscribe endpoint
  • Publish message
  • Subscription persistence
  • Integrations with (Fake-)SQS, File, HTTP, RabbitMQ, Slack

Usage

Docker

Based on the official java:8-jre-alpine image. Run it with the command:

docker run -d -p 9911:9911 s12v/sns

If you would like to keep the topic/subscription database in the current host folder:

docker run -d -p 9911:9911 -v "$PWD":/etc/sns s12v/sns

Using aws-cli

The image has aws-cli preinstalled. For example, create a topic:

docker exec <CONTAINER_ID> sh -c 'aws sns --endpoint-url http://localhost:9911 create-topic --name test1'

Jar

Download the latest release from https://github.com/s12v/sns/releases and run:

DB_PATH=/tmp/db.json java -jar sns-0.2.0.jar

Requires Java8.

Configuration

Configuration can be set via environment variables:

  • DB_PATH - path to subscription database file, default: db.json
  • HTTP_INTERFACE - interface to bind to, default: 0.0.0.0
  • HTTP_PORT - tcp port, default: 9911

Supported integrations

  • Amazon SQS: aws-sqs://queueName?amazonSQSEndpoint=...&accessKey=&secretKey=
  • RabbitMQ: rabbitmq://hostname[:port]/exchangeName[?options]
  • HTTP: http:hostName[:port][/resourceUri][?options]
  • File: file://tmp?fileName=sns1.txt
  • Slack: slack:@username?webhookUrl=https://hooks.slack.com/services/aaa/bbb/ccc

See camel documentation for more details.

Note: Environment variables can be used to specify URIs via {{env:ENV_NAME}}.

Example: aws-sqs://{{env:QUEUE_NAME}}?amazonSQSEndpoint={{env:SQS_ENDPOINT}}&...

Example fake SQS integration:

Tested with elasticmq. See example/docker-compose.yml and example/config/db.json

docker run -d -p 9911:9911 -v "$PWD/example/config":/etc/sns s12v/sns

Development

Unit tests

sbt test

Integration tests

It's tested with AWS Ruby and PHP SDKs. Start elasticmq for SQS integration tests with

docker run -d -p 9324:9324 s12v/elasticmq

Ruby SDK tests:

bundle install
ENDPOINT=http://localhost:9911 bundle exec cucumber

PHP SDK tests:

composer install
./bin/behat
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].