Skip to content

Commit

Permalink
Update url in api docs
Browse files Browse the repository at this point in the history
This api will change later, but it makes it easier to try out the docs right now.
  • Loading branch information
fwilhe authored Oct 1, 2024
1 parent 1a06d4c commit 8d6e7a9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/test/java/io/gardenlinux/glvd/GlvdControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void setUp(RestDocumentationContextProvider restDocumentation) {
public void shouldReturnCvesForGardenlinux() {
given(this.spec).accept("application/json")
.filter(document("getCveForDistro",
preprocessRequest(modifyUris().scheme("https").host("glvd.gardenlinux.io").removePort()),
preprocessRequest(modifyUris().scheme("https").host("glvd.ingress.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com").removePort()),
preprocessResponse(prettyPrint())))
.when().port(this.port).get("/v1/cves/1592.0?sortBy=cveId&sortOrder=DESC&pageNumber=4&pageSize=2")
.then().statusCode(HttpStatus.SC_OK);
Expand All @@ -86,7 +86,7 @@ public void shouldReturnCvesForGardenlinux() {
public void shouldReturnCvesForListOfPackages() {
given(this.spec).accept("application/json")
.filter(document("getCveForPackages",
preprocessRequest(modifyUris().scheme("https").host("glvd.gardenlinux.io").removePort()),
preprocessRequest(modifyUris().scheme("https").host("glvd.ingress.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com").removePort()),
preprocessResponse(prettyPrint())))
.when().port(this.port).get("/v1/cves/1592.0/packages/crun,vim?pageNumber=4&pageSize=2")
.then().statusCode(HttpStatus.SC_OK);
Expand All @@ -106,7 +106,7 @@ public void shouldReturnCvesForPutListOfPackages() {

given(this.spec).accept("application/json")
.filter(document("getCveForPackagesPut",
preprocessRequest(modifyUris().scheme("https").host("glvd.gardenlinux.io").removePort()),
preprocessRequest(modifyUris().scheme("https").host("glvd.ingress.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com").removePort()),
preprocessResponse(prettyPrint())))
.contentType("application/json")
.body(packageList)
Expand All @@ -118,7 +118,7 @@ public void shouldReturnCvesForPutListOfPackages() {
public void shouldGetPackagesForDistro() {
given(this.spec).accept("application/json")
.filter(document("getPackages",
preprocessRequest(modifyUris().scheme("https").host("glvd.gardenlinux.io").removePort()),
preprocessRequest(modifyUris().scheme("https").host("glvd.ingress.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com").removePort()),
preprocessResponse(prettyPrint())))
.when().port(this.port).get("/v1/distro/1592.0?pageNumber=4&pageSize=2")
.then().statusCode(200);
Expand All @@ -128,7 +128,7 @@ public void shouldGetPackagesForDistro() {
public void shouldPackageWithVulnerabilities() {
given(this.spec).accept("application/json")
.filter(document("getPackageWithVulnerabilities",
preprocessRequest(modifyUris().scheme("https").host("glvd.gardenlinux.io").removePort()),
preprocessRequest(modifyUris().scheme("https").host("glvd.ingress.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com").removePort()),
preprocessResponse(prettyPrint())))
.when().port(this.port).get("/v1/packages/vim?pageNumber=4&pageSize=2")
.then().statusCode(200);
Expand All @@ -138,7 +138,7 @@ public void shouldPackageWithVulnerabilities() {
public void shouldPackageWithVulnerabilitiesByVersion() {
given(this.spec).accept("application/json")
.filter(document("getPackageWithVulnerabilitiesByVersion",
preprocessRequest(modifyUris().scheme("https").host("glvd.gardenlinux.io").removePort()),
preprocessRequest(modifyUris().scheme("https").host("glvd.ingress.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com").removePort()),
preprocessResponse(prettyPrint())))
.when().port(this.port).get("/v1/packages/vim/2:9.1.0496-1+b1?pageNumber=4&pageSize=2")
.then().statusCode(200);
Expand All @@ -148,7 +148,7 @@ public void shouldPackageWithVulnerabilitiesByVersion() {
public void shouldGetPackagesByVulnerability() {
given(this.spec).accept("application/json")
.filter(document("getPackagesByVulnerability",
preprocessRequest(modifyUris().scheme("https").host("glvd.gardenlinux.io").removePort()),
preprocessRequest(modifyUris().scheme("https").host("glvd.ingress.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com").removePort()),
preprocessResponse(prettyPrint())))
.when().port(this.port).get("/v1/distro/1592.0/CVE-2023-50387")
.then().statusCode(200);
Expand Down

0 comments on commit 8d6e7a9

Please sign in to comment.