Since bcgov/gwa-api#155, included in gwa v1.0.42, e2e tests for gwa status fail. This is because gwa-api now calls out to kube-api for status endpoints and we aren't running kube-api in local/e2e.
Resolution: This could be covered by adding mocks for kube or for gwa-cli to handle these requests.
Or a more full fledged solution involving:
- deploy Kube API as part of the Cypress docker-compose and wire up gatewayApi to call it
- design decision on how to have Kube API work in a docker environment (new kubeAPi, enhance existing kubeApi, add skip-logic in gatewayApi)
- implement updated Kube API
Quick fix: In the meantime, I implemented a quick fix of adding an env variable to Cypress config (HAS_KUBE_API) and gating the relevant tests with this variable.
Test Case
ENV
TESTCASE
- publish services in local/e2e
- call
gwa status
EXPECTED
ACTUAL
"Error: Unexpected error occurred"
Since bcgov/gwa-api#155, included in gwa v1.0.42, e2e tests for
gwa statusfail. This is becausegwa-apinow calls out tokube-apifor status endpoints and we aren't runningkube-apiin local/e2e.Resolution: This could be covered by adding mocks for
kubeor forgwa-clito handle these requests.Or a more full fledged solution involving:
Quick fix: In the meantime, I implemented a quick fix of adding an env variable to Cypress config (
HAS_KUBE_API) and gating the relevant tests with this variable.Test Case
ENV
DEVTESTPRODTESTCASE
gwa statusEXPECTED
ACTUAL
"Error: Unexpected error occurred"