GithubHelp home page GithubHelp logo

ggit88 / microshed-it-mail Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 15 KB

Simple Microshed Integration Testing Scenario: Open Liberty + Mock API + Mail Server

License: MIT License

Dockerfile 1.27% Java 90.58% HTML 8.15%
testcontainers openliberty microshed-testing smtp imap greenmail

microshed-it-mail's Introduction

Microshed IT with Mail Server

Simple Microshed Integration Testing Scenario: Open Liberty + Mock API + Mail Server

Scenario

To validate user identity and empower security, a service sends a One Time Password (OTP) to a trusted email address. Retrieve OTP service retrieves the OTP from the sent email for a given user id.

The email stuff (address, box) is owned by a generic email provider (Gmail, Outlook, etc), the association between user and email address is owned by an external API (UserAPI).

Project

The main purpose of the project is to set up an integration tests suite for the Retrieve OTP service mocking the external resources: mail server and external API.

Microshed for Open Liberty has been used as testing framework, Microshed itself is built on top of Testcontainers, some of their features used in the project are:

  • Networking: all the containers share the same virtual network so they can use logical names and exposed ports
  • Mock server: Testcontainers facility used to mock the external API
  • Generic container: Testcontainers facility to use a generic docker image, used to mock the mail server

Testcontainer does not have a built in mail server container so Greenmail has been used as SMTP and IMAP/IMAPS server.

Environment

This project has been tested up and running with the following:

  • Java 1.8.0_181
  • Apache Maven 3.5.4
  • Docker 20.10.0

Resources

microshed-it-mail's People

Contributors

ggit88 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.