bcgov / bcgov/gwa-api

Improving e2e testing with a 'non-op' kubeAPI

Open
#124 1 comment 0 reactions 0 assignees View on GitHub
jira
Dominant language
Python
Stars
5
Forks
4
Avg merge
3d 4h
Merged PRs (30d)
9

Description

Current end to end testing in Cypress is limited in that the outputs of the kube API (which takes calls from gateway API to make necessary updates to routes on kubernetes) are not checked.

Creating a mode for kubeAPI where the kubernetes updates are output to file or stdout and checked as part of e2e testing would improve coverage

Implementation will involve:
1. Creating a non-op 'switch' to use in the kube-api (env variable or startup parameter?)
2. Modify the behaviour of the functions that create k8s routes to instead just return the route yaml (based on the non-op switch)
- How to pass this response back through gwa-api and Portal api? or can we review the `kube-api` output more directly?
3. Create new Cypress tests which check the k8s route yaml

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the kube-api calls from the gateway API and Portal API, then review the existing Cypress end-to-end tests. Define how a non-op switch is supplied and how route YAML reaches the tests, whether through stdout, files, or the APIs. Done means new Cypress tests verify the generated Kubernetes route YAML without applying updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, kubernetes, python
Domain
backend-api-design, infrastructure, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.