Skip to content

Commit

Permalink
Add trailing slash
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz committed Sep 27, 2023
1 parent 2025f5f commit caaa5b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func processAppEndpoints(

formattedPaths := []string{}
for _, pathName := range apiPaths {
formattedPaths = append(formattedPaths, fmt.Sprintf("/api/%s", pathName))
formattedPaths = append(formattedPaths, fmt.Sprintf("/api/%s/", pathName))
}

if bool(innerDeployment.Web) || innerDeployment.WebServices.Public.Enabled {
Expand Down
1 change: 0 additions & 1 deletion tests/kuttl/test-basic-app/02-json-asserts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ commands:
- script: jq -r '.endpoints[] | select(.app == "puptoo") | select(.name == "processor") | .apiPath == "/api/puptoo-processor/"' -e < /tmp/test-basic-app-json
- script: jq -r '.endpoints[] | select(.app == "puptoo") | select(.name == "processor") | .apiPaths[0] == "/api/puptoo-processor/"' -e < /tmp/test-basic-app-json


- script: jq -r '.privateEndpoints[] | select(.app == "puptoo") | select(.name == "processor") | .hostname == "puptoo-processor.test-basic-app.svc"' -e < /tmp/test-basic-app-json
- script: jq -r '.privateEndpoints[] | select(.app == "puptoo") | select(.name == "processor2") | .hostname == "puptoo-processor2.test-basic-app.svc"' -e < /tmp/test-basic-app-json
- script: jq -r '.privateEndpoints[] | select(.app == "puptoo") | select(.name == "processor") | .port == 10000' -e < /tmp/test-basic-app-json
Expand Down
6 changes: 3 additions & 3 deletions tests/kuttl/test-ephemeral-gateway/02-json-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ commands:
- script: jq -r '.endpoints[] | select(.app == "puptoo") | select(.name == "processor") | .apiPaths[0] == "/api/puptoo/"' -e < /tmp/test-ephemeral-gateway-json
- script: kubectl get secret --namespace=test-ephemeral-gateway puptoo-2paths -o json > /tmp/test-ephemeral-gateway
- script: jq -r '.data["cdappconfig.json"]' < /tmp/test-ephemeral-gateway | base64 -d > /tmp/test-ephemeral-gateway-json
- script: jq -r '.endpoints[] | select(.app == "puptoo") | select(.name == "processor") | .apiPath == "/api/puptoo1/"' -e < /tmp/test-ephemeral-gateway-json
- script: jq -r '.endpoints[] | select(.app == "puptoo") | select(.name == "processor") | .apiPaths[0] == "/api/puptoo1/"' -e < /tmp/test-ephemeral-gateway-json
- script: jq -r '.endpoints[] | select(.app == "puptoo") | select(.name == "processor") | .apiPaths[1] == "/api/puptoo2/"' -e < /tmp/test-ephemeral-gateway-json
- script: jq -r '.endpoints[] | select(.app == "puptoo-2paths") | select(.name == "processor") | .apiPath == "/api/puptoo1/"' -e < /tmp/test-ephemeral-gateway-json
- script: jq -r '.endpoints[] | select(.app == "puptoo-2paths") | select(.name == "processor") | .apiPaths[0] == "/api/puptoo1/"' -e < /tmp/test-ephemeral-gateway-json
- script: jq -r '.endpoints[] | select(.app == "puptoo-2paths") | select(.name == "processor") | .apiPaths[1] == "/api/puptoo2/"' -e < /tmp/test-ephemeral-gateway-json

0 comments on commit caaa5b0

Please sign in to comment.