Skip to content

Commit 6498afc

Browse files
committed
try to make tests pass locally and on github
1 parent 2b4bda3 commit 6498afc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/test/java/pl/project13/maven/git/GitCommitIdMojoIntegrationTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,13 +594,16 @@ public void shouldSkipWithoutFailOnNoGitDirectoryWhenNoGitRepoFound(boolean useN
594594
mojo.failOnNoGitDirectory = false;
595595
mojo.useNativeGit = useNativeGit;
596596

597+
// Set empty env to avoid exposing "git.build.number.unique", "git.build.number"
598+
Map<String, String> env = new HashMap<>();
599+
when(mojo.getCustomSystemEnv()).thenReturn(env);
600+
597601
// when
598602
mojo.execute();
599603

600604
// then
601605
assertThat(targetProject.getProperties().keySet()).containsOnly(
602-
"git.build.time", "git.build.version", "git.build.host",
603-
"git.build.number.unique", "git.build.number");
606+
"git.build.time", "git.build.version", "git.build.host");
604607
}
605608

606609
@ParameterizedTest

0 commit comments

Comments
 (0)