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

how can i run this from within a test #16

Open
avnerbarr opened this issue Apr 8, 2018 · 3 comments
Open

how can i run this from within a test #16

avnerbarr opened this issue Apr 8, 2018 · 3 comments

Comments

@avnerbarr
Copy link

I want to start an instance of the db when running a test.
How can I do that?

@fedefernandez
Copy link
Contributor

fedefernandez commented Apr 8, 2018

The plugin was intended to be used for starting a embedded Cassandra instance in a SBT session and then execute the tests, ideally the integration tests.

In freestyle-cassandra, for example, we're relying on the plugin for executing the integration tests. We start the server in the travis file and then execute the it:test task.

See the Readme for instructions about how to start the instance through SBT.

@avnerbarr
Copy link
Author

I added this addSbtPlugin("com.47deg" % "sbt-embedded-cassandra" % "0.0.6") to my plugins file

when I am in sbt and run embeddedCassandraStart I get this error:

[error] Not a valid command: embeddedCassandraStart
[error] Not a valid project ID: embeddedCassandraStart
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: embeddedCassandraStart
[error] embeddedCassandraStart
[error]```

@fedefernandez
Copy link
Contributor

Thanks for raising the issue, it seems that the autoplugin is not working anymore and there is a missing default value. In order to use the plugin you need to add these two settings to your project:

enablePlugins(EmbeddedCassandraPlugin)
embeddedCassandraCQLFileSetting := None

I'll fix that for the next release.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants