Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtreier committed Oct 1, 2024
1 parent 509c429 commit a09cc15
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public class ConfigProps {

public static final ConfigProp EDC_LAST_COMMIT_INFO = ConfigProp.builder()
.category(Category.ADVANCED)
.property("edc.build.date")
.property("edc.last.commit.info")
.description("Last Commit Info / Build Version, usually set via CI into a build arg into the built image")
.defaultValue("Unknown Version")
.build().also(ALL_CE_PROPS::add);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,20 @@ void setUp(EdcExtension extension) {
@Test
void testEnvAndJar() {
var request = given()
.baseUri(config.getManagementApiUrl())
.header("X-Api-Key", config.getManagementApiKey())
.when()
.contentType(ContentType.JSON)
.get("/last-commit-info")
.then()
.statusCode(200)
.contentType(ContentType.JSON);
.baseUri(config.getManagementApiUrl())
.header("X-Api-Key", config.getManagementApiKey())
.when()
.contentType(ContentType.JSON)
.get("/last-commit-info")
.then()
.statusCode(200)
.contentType(ContentType.JSON);

request.assertThat().body("envLastCommitInfo", equalTo("test env commit message"))
.body("envBuildDate", equalTo("2023-05-08T15:15:00Z"))
.body("jarLastCommitInfo", equalTo("test jar commit message"))
.body("jarBuildDate", equalTo("2023-05-09T15:30:00Z"));
request.assertThat()
.body("envLastCommitInfo", equalTo("test env commit message"))
.body("jarLastCommitInfo", equalTo("test jar commit message"))
.body("envBuildDate", equalTo("2023-05-08T15:15:00Z"))
.body("jarBuildDate", equalTo("2023-05-09T15:30:00Z"));

}
}

0 comments on commit a09cc15

Please sign in to comment.