Coder Social home page Coder Social logo

sbt-dynamodb's Introduction

sbt-dynamodb

Support for running DynamoDB Local for use in integration tests.

Based on the Maven Plugin for DynamoDB.

Installation

Add the following to your project/plugins.sbt file:

addSbtPlugin("com.teambytes.sbt" % "sbt-dynamodb" % "1.1")

Configuration

The following represents the minimum amount of code required in a build.sbt to use sbt-dynamodb

To use the dynamodb settings in your project, add DynamoDBLocal.settings to your build, set the directory to use for the DynamoDB Local jar and have your tests depend on starting the DynamoDB Local instance.

DynamoDBLocal.settings

DynamoDBLocal.Keys.dynamoDBLocalDownloadDirectory := file("dynamodb-local")

test in Test <<= (test in Test).dependsOn(DynamoDBLocal.Keys.startDynamoDBLocal)

To use a specific version ("latest" is the default DynamoDB version to download and run)

dynamoDBLocalVersion := "2014-10-07"

To specify a port other than the default 8000

dynamoDBLocalPort := Some(8080)

The default for the DynamoDB Local instance is to run in "in-memory" mode. To use a persistent file based mode you need to set both the data path & turn off in-memory.

dynamoDBLocalInMemory := false

dynamoDBLocalDBPath := Some("some/directory/here")

The default regarding tests is to both stop & cleanup any data directory if specified. This can be changed using the below settings.

stopDynamoDBLocalAfterTests := false

cleanDynamoDBLocalAfterStop := false
Note: Regarding stopping the DynamoDB Local instance after the tests. To ensure the instance is stopped, please make sure not to override testOptions in Test and instead append (e.g. use += instead of :=).

sbt-dynamodb's People

Contributors

grahamar avatar provegard avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.