mirror of
https://github.com/corda/corda.git
synced 2024-12-19 21:17:58 +00:00
Enable selective runs
This commit is contained in:
parent
74e65f392f
commit
407885c93b
@ -45,3 +45,14 @@ To get started, please follow the instructions below:
|
||||
This script will download necessary database drivers and set up
|
||||
the dependencies directory with copies of the Corda fat-JAR and
|
||||
the network bootstrapping tool.
|
||||
|
||||
# Selective Runs
|
||||
|
||||
If you only want to run tests of a specific tag, you can append
|
||||
the following parameter to the Gradle command:
|
||||
|
||||
```bash
|
||||
$ ../../gradlew scenario -Ptags="@cash"
|
||||
# or
|
||||
$ ../../gradlew scenario -Ptags="@cash,@logging"
|
||||
```
|
@ -108,6 +108,11 @@ task scenarios(type: Test) {
|
||||
setTestClassesDirs sourceSets.scenario.output.getClassesDirs()
|
||||
classpath = sourceSets.scenario.runtimeClasspath
|
||||
outputs.upToDateWhen { false }
|
||||
|
||||
if (project.hasProperty("tags")) {
|
||||
systemProperty "cucumber.options", "--tags $tags"
|
||||
logger.warn("Only running tests tagged with: $tags ...")
|
||||
}
|
||||
}
|
||||
|
||||
//scenarios.mustRunAfter test
|
||||
|
@ -4,7 +4,6 @@ import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(Cucumber::class)
|
||||
@CucumberOptions(
|
||||
features = arrayOf("src/scenario/resources/features"),
|
||||
glue = arrayOf("net.corda.behave.scenarios"),
|
||||
plugin = arrayOf("pretty")
|
||||
)
|
||||
|
@ -1,3 +1,4 @@
|
||||
@cash @issuance
|
||||
Feature: Cash - Issuable Currencies
|
||||
To have cash on ledger, certain nodes must have the ability to issue cash of various currencies.
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
@database @connectivity
|
||||
Feature: Database - Connection
|
||||
For Corda to work, a database must be running and appropriately configured.
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
@logging @startup
|
||||
Feature: Startup Information - Logging
|
||||
A Corda node should inform the user of important parameters during startup so that he/she can confirm the setup and
|
||||
configure / connect relevant software to said node.
|
||||
@ -7,7 +8,14 @@ Feature: Startup Information - Logging
|
||||
And node A uses database of type H2
|
||||
And node A is located in London, GB
|
||||
When the network is ready
|
||||
Then user can retrieve logging information for node A
|
||||
|
||||
Scenario: Node shows database details on startup
|
||||
Given a node A of version MASTER
|
||||
When the network is ready
|
||||
Then user can retrieve database details for node A
|
||||
|
||||
Scenario: Node shows version information on startup
|
||||
Given a node A of version MASTER
|
||||
Then node A is on platform version 2
|
||||
And node A is on version 3.0-SNAPSHOT
|
||||
And user can retrieve logging information for node A
|
||||
And user can retrieve database details for node A
|
||||
|
@ -14,7 +14,7 @@ class CommandTests {
|
||||
|
||||
@Test
|
||||
fun `failed command returns non-zero`() {
|
||||
val exitCode = Command(listOf("some-random-command-that-does-not-exist")).run()
|
||||
val exitCode = Command(listOf("ls", "some-weird-path-that-does-not-exist")).run()
|
||||
assertThat(exitCode).isNotEqualTo(0)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user