Added one more test

This commit is contained in:
Marcin Grzejszczak
2018-10-15 21:17:11 +02:00
parent 5c51015c84
commit 930f70f8e9

View File

@@ -119,6 +119,19 @@ public class ProjectBuilderTests {
.contains("-Dhello=world -Dfoo=bar");
}
@Test
public void should_successfully_execute_a_command_when_system_props_placeholder_is_present_and_there_are_no_sys_props() throws Exception {
ReleaserProperties properties = new ReleaserProperties();
properties.getMaven().setBuildCommand("echo foo {{systemProps}}");
properties.setWorkingDir(tmpFile("/builder/resolved").getPath());
ProjectBuilder builder = new ProjectBuilder(properties, executor(properties));
builder.build(new ProjectVersion("foo", "1.0.0.BUILD-SNAPSHOT"));
then(asString(tmpFile("/builder/resolved/resolved.log")))
.contains("foo");
}
@Test
public void should_successfully_execute_a_command_when_system_props_placeholder_is_present_without_system_props() throws Exception {
ReleaserProperties properties = new ReleaserProperties();