RedHatInsights / bonfire

Orchestrates ephemeral environments for testing cloud.redhat.com applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empty dictionary needs to be checked in Namespace.refresh()

bsquizz opened this issue · comments

If you pass in an invalid namespace name to a Namespace and call .refresh() on it, get_json will return {} and the lines of code checking for annotations/labels will hit a KeyError

https://github.com/RedHatInsights/bonfire/blob/master/bonfire/namespaces.py#L124-L131

We should fail with a more user-friendly error if the namespace does not exist.