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
|
||||
public class CommitInfoController {
|
||||
|
||||
@Value("${git.commit.message.short}")
|
||||
private String commitMessage;
|
||||
|
||||
|
|
|
@ -22,11 +22,16 @@ public class CommitIdTest {
|
|||
|
||||
@Test
|
||||
public void shouldInjectGitInfoProperties() throws Exception {
|
||||
assertThat(commitMessage).isNotNull();
|
||||
assertThat(commitMessage).isNotEqualTo("${git.commit.message.short}");
|
||||
assertThat(branch).isNotNull();
|
||||
assertThat(branch).isNotEqualTo("${git.branch}");
|
||||
assertThat(commitId).isNotNull();
|
||||
assertThat(commitId).isNotEqualTo("${git.commit.id}");
|
||||
assertThat(commitMessage)
|
||||
.isNotNull()
|
||||
.isNotEqualTo("${git.commit.message.short}");
|
||||
|
||||
assertThat(branch)
|
||||
.isNotNull()
|
||||
.isNotEqualTo("${git.branch}");
|
||||
|
||||
assertThat(commitId)
|
||||
.isNotNull()
|
||||
.isNotEqualTo("${git.commit.id}");
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
Subproject commit b3e635b96d114e25ca1da696acfd881b5fac28a7
|
Loading…
Reference in New Issue