-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement proxying test cases (#14831)
* Implement simple proxy cases They test response codes and bodies * Add timeout endpoint * Add timeout test case * Cleanup test placement * Return response body Now it's possible to log response bodies AND verify the content. It's also possible to inspect whole responses in tests. * Move timeout to negative authorisation * Remove status verification from body tests * Separate edge-cases * Bump images * Merge test files
- Loading branch information
Showing
8 changed files
with
169 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...plication-connector/resources/charts/gateway-test/templates/applications/proxy-errors.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
apiVersion: applicationconnector.kyma-project.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: proxy-errors | ||
namespace: "{{ .Values.namespace }}" | ||
spec: | ||
description: Proxying edge cases | ||
skipVerify: true | ||
labels: | ||
app: proxy-errors | ||
services: | ||
- displayName: code 123 | ||
name: code 123 | ||
providerDisplayName: code 123 | ||
description: Should return 503, receiving unknown informational codes | ||
id: "{{ uuidv4 }}" | ||
entries: | ||
- type: API | ||
targetUrl: "http://{{ .Values.mockServiceName }}.{{ .Values.namespace }}.svc.cluster.local:8080/v1/api/unsecure/code/123" | ||
centralGatewayUrl: "http://central-application-gateway.kyma-system:8080/proxy-errors/code-123" | ||
- displayName: timeout | ||
name: timeout | ||
providerDisplayName: timeout | ||
description: Should return 503 when target times out | ||
id: "{{ uuidv4 }}" | ||
entries: | ||
- type: API | ||
targetUrl: "http://{{ .Values.mockServiceName }}.{{ .Values.namespace }}.svc.cluster.local:8080/v1/api/unsecure/timeout" | ||
centralGatewayUrl: "http://central-application-gateway.kyma-system:8080/proxy-errors/timeout" |
38 changes: 38 additions & 0 deletions
38
...s/application-connector/resources/charts/gateway-test/templates/applications/proxying.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: applicationconnector.kyma-project.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: proxy-cases | ||
namespace: "{{ .Values.namespace }}" | ||
spec: | ||
description: Proxying | ||
skipVerify: true | ||
labels: | ||
app: proxy-cases | ||
services: | ||
- displayName: code 451 | ||
name: code 451 | ||
providerDisplayName: code 451 | ||
description: Should return 451 forwarded from target endpoint | ||
id: "{{ uuidv4 }}" | ||
entries: | ||
- type: API | ||
targetUrl: "http://{{ .Values.mockServiceName }}.{{ .Values.namespace }}.svc.cluster.local:8080/v1/api/unsecure/code/451" | ||
centralGatewayUrl: "http://central-application-gateway.kyma-system:8080/proxy-cases/code-451" | ||
- displayName: code 307 | ||
name: code 307 | ||
providerDisplayName: code 307 | ||
description: Should return 307 forwarded from target endpoint | ||
id: "{{ uuidv4 }}" | ||
entries: | ||
- type: API | ||
targetUrl: "http://{{ .Values.mockServiceName }}.{{ .Values.namespace }}.svc.cluster.local:8080/v1/api/unsecure/code/307" | ||
centralGatewayUrl: "http://central-application-gateway.kyma-system:8080/proxy-cases/code-307" | ||
- displayName: code 203 | ||
name: code 203 | ||
providerDisplayName: code 203 | ||
description: Should return 203 forwarded from target endpoint | ||
id: "{{ uuidv4 }}" | ||
entries: | ||
- type: API | ||
targetUrl: "http://{{ .Values.mockServiceName }}.{{ .Values.namespace }}.svc.cluster.local:8080/v1/api/unsecure/code/203" | ||
centralGatewayUrl: "http://central-application-gateway.kyma-system:8080/proxy-cases/code-203" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
tests/components/application-connector/test/application-gateway/complex_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters