Skip to content

Commit

Permalink
Fix s2i and liquibas
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaaano committed Sep 8, 2023
1 parent c65b865 commit 02f3471
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .s2i/environment

This file was deleted.

8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,16 @@ These instructions are intended to be used in testing and development and not fo

### JVM build

_**TODO:** Not working, fix the /.s2i script._

```
oc new-build --binary=true --docker-image=registry.redhat.io/ubi8/openjdk-11 --name=quarkus --labels="app=quarkus-app"
oc new-build --binary=true --image=registry.redhat.io/ubi9/openjdk-17 --name=quarkus --labels="app=quarkus-app"
oc start-build quarkus --from-dir . --follow
```

### Native build

```
mvn clean package -Pnative -Dquarkus.native.container-build=true
oc new-build --binary=true --docker-image=quay.io/quarkus/ubi-quarkus-native-binary-s2i:1.0 --name=quarkus-native --labels="app=quarkus-app"
oc new-build --binary=true --docker-image=quay.io/quarkus/ubi-quarkus-native-binary-s2i:2.0 --name=quarkus-native --labels="app=quarkus-app"
oc start-build quarkus-native --from-file ./target/quarkus-app-1.0.1-runner --follow
```

Expand All @@ -110,7 +108,7 @@ oc start-build quarkus-native --from-file ./target/quarkus-app-1.0.1-runner --fo
Once image is built and pushed to the registry, just set the image in the deployment:

```
oc set image deployment quarkus app=$(oc get istag quarkus-native:latest -o jsonpath='{.image.dockerImageReference}')
oc set image deployment quarkus app=$(oc get istag quarkus:latest -o jsonpath='{.image.dockerImageReference}')
```

Review any steps above in [OpenShift](#OpenShift).
Expand Down
2 changes: 1 addition & 1 deletion manifests/00-job-liquibase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
image: docker.io/liquibase/liquibase:4.23.1-alpine
args:
[
"--url=jdbc:postgresql://postgresql:5432/quarkusdb1",
"--url=jdbc:postgresql://postgresql:5432/quarkusdb",
"--username=quarkus",
"--password=password",
"--defaultsFile=/liquibase/changelog/liquibase.properties",
Expand Down
9 changes: 5 additions & 4 deletions src/test/java/app/pet/ws/WebServicePetRepositoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import static app.pet.Pet.pet;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import jakarta.inject.Inject;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.WebApplicationException;
import org.junit.jupiter.api.Test;
import app.pet.PetRepository;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
import jakarta.inject.Inject;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.WebApplicationException;

@QuarkusTest
@TestProfile(WebServiceTestProfile.class)
Expand Down Expand Up @@ -58,9 +58,10 @@ void find_pet_network_fault() {
@Test
void find_pet_timeout() {

assertThrows(ProcessingException.class, () -> {
var exception = assertThrows(ProcessingException.class, () -> {
repository.find("timeout");
});
assertThat(exception).hasMessageEndingWith("Read timed out");
}

@Test
Expand Down

0 comments on commit 02f3471

Please sign in to comment.