how can i run this from within a test
avnerbarr opened this issue · comments
I want to start an instance of the db when running a test.
How can I do that?
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.
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]```
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!