Refactor git commit id examples
This commit is contained in:
parent
1d511d4336
commit
91d12fe986
@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class CommitInfoController {
|
public class CommitInfoController {
|
||||||
|
|
||||||
@Value("${git.commit.message.short}")
|
@Value("${git.commit.message.short}")
|
||||||
private String commitMessage;
|
private String commitMessage;
|
||||||
|
|
||||||
|
@ -22,11 +22,16 @@ public class CommitIdTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldInjectGitInfoProperties() throws Exception {
|
public void shouldInjectGitInfoProperties() throws Exception {
|
||||||
assertThat(commitMessage).isNotNull();
|
assertThat(commitMessage)
|
||||||
assertThat(commitMessage).isNotEqualTo("${git.commit.message.short}");
|
.isNotNull()
|
||||||
assertThat(branch).isNotNull();
|
.isNotEqualTo("${git.commit.message.short}");
|
||||||
assertThat(branch).isNotEqualTo("${git.branch}");
|
|
||||||
assertThat(commitId).isNotNull();
|
assertThat(branch)
|
||||||
assertThat(commitId).isNotEqualTo("${git.commit.id}");
|
.isNotNull()
|
||||||
|
.isNotEqualTo("${git.branch}");
|
||||||
|
|
||||||
|
assertThat(commitId)
|
||||||
|
.isNotNull()
|
||||||
|
.isNotEqualTo("${git.commit.id}");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1 +0,0 @@
|
|||||||
Subproject commit b3e635b96d114e25ca1da696acfd881b5fac28a7
|
|
Loading…
x
Reference in New Issue
Block a user