Kubernetes dashboard tests passed when dashboard 404'd

Bug #1845270 reported by Mike Wilson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charmed Kubernetes Testing
Incomplete
High
Adam Stokes

Bug Description

The dashboard on 1.16 would 404 on the overview page and return you to the previous page. This wasn't caught in the tests because the test just verifies the return value is 200, which it is because you get a real page, but the page says 404. We need to find a way to detect this.

Revision history for this message
Adam Stokes (adam-stokes) wrote :

Can you point me to the line numbers where this test occurs? I can do some html parsing to make sure it has the proper page loaded

Changed in charmed-kubernetes-testing:
assignee: nobody → Adam Stokes (adam-stokes)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Mike Wilson (knobby) wrote :

This is what we do currently:

    async def dashboard_present(url):
        resp = await tools.requests.get(url, auth=auth, verify=False)
        if resp.status_code == 200 and "Dashboard" in resp.text:
            return True
        return False

https://github.com/charmed-kubernetes/jenkins/blob/master/jobs/integration/validation.py#L357

It seems the response has dashboard in it, but also a 404 and a redirect.

Changed in charmed-kubernetes-testing:
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.