Created
November 19, 2014 11:59
-
-
Save kpiwko/2d7752f6fb69dfe062a8 to your computer and use it in GitHub Desktop.
Gradle profile test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void profilesInstallationsTestsArrays() { | |
Project project = ProjectBuilder.builder().build() | |
project.apply plugin: 'spacelift' | |
// enable foobar profile | |
project.ext.set("foobar", "true") | |
project.spacelift { | |
tools { rhc { command "rhc" } } | |
profiles { | |
foobar { | |
enabledInstallations ([ | |
"eap", | |
"ews" | |
]) | |
tests (["fooTest", "barTest"]) | |
} | |
} | |
installations { | |
eap {} | |
ews {} | |
} | |
tests { | |
fooTest {} | |
barTest {} | |
} | |
} | |
// initialize current project tools - this is effectively init-tools task | |
GradleSpacelift.currentProject(project) | |
project.getTasks()['init'].execute() | |
assertThat project.selectedProfile, is(notNullValue()) | |
assertThat project.selectedProfile.name, is('foobar') | |
assertThat project.selectedInstallations.size(), is(2) | |
//assertThat project.selectedTests.size(), is(2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment