Skip to content

Can't test gwa status or related endpoints since functionality moved from gwa-api to kube-api #1275

Description

@rustyjux

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

  • e2e ONLY
  • DEV
  • TEST
  • PROD

TESTCASE

  • publish services in local/e2e
  • call gwa status

EXPECTED

  • service status returned

ACTUAL

  • "Error: Unexpected error occurred"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions