Refactor git commit id examples
This commit is contained in:
@@ -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}");
|
||||
}
|
||||
}
|
||||
Submodule testgitrepo deleted from b3e635b96d
Reference in New Issue
Block a user