~tcarrio/github-sync

414af56acd2aa7eaf9968d61291bdb15e2d7de04 — Tom Carrio 3 years ago 440dd52
Fixed REST Controller test, added stages for SourceHut to build/test/package to native binary using OpenJDK 11
2 files changed, 8 insertions(+), 3 deletions(-)

M .build.yml
M src/test/java/dev/carrio/github_sync/ProjectControllerTest.java
M .build.yml => .build.yml +5 -0
@@ 1,4 1,6 @@
image: archlinux
packages:
  - jdk11-openjdk
sources:
  - https://git.sr.ht/~tcarrio/github-sync
  - https://git.sr.ht/~tcarrio/git-mirror


@@ 8,4 10,7 @@ environment:
secrets:
  - 4e983fc2-9d24-43eb-9986-1c18feb2e7b8
tasks:
  - use-java-11: archlinux-java set java-11-openjdk
  - await-docker: while ! docker ps; do sleep 1; done
  - test-and-build: ./mvnw package -Pnative -Dquarkus.native.container-build=true
  - mirror-all: git-mirror/git-mirror.sh $PROJECT_DIR
\ No newline at end of file

M src/test/java/dev/carrio/github_sync/ProjectControllerTest.java => src/test/java/dev/carrio/github_sync/ProjectControllerTest.java +3 -3
@@ 10,12 10,12 @@ import static org.hamcrest.CoreMatchers.is;
public class ProjectControllerTest {

    @Test
    public void testHelloEndpoint() {
    public void testProjectsEndpoint() {
        given()
          .when().get("/resteasy/hello")
          .when().get("/projects")
          .then()
             .statusCode(200)
             .body(is("hello"));
             .body(is("[]"));
    }

}
\ No newline at end of file