Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TestTrigger_Error using deterministic inputs
TestTrigger_Error had an error test case that was expecting failure due to a bad kubeconfig input. The kubeconfig was passed in via a flag/global variable which means in the test its value is "". This is a problem since if the kubeconfig is an empty string, one of the underlying functions will try to authenticate using inClusterConfig which means that the test behaves differently depending on whether in runs in a k8s pod with access to the apiserver or not. In local and CI runs, the test passes since its either out of a k8s cluster or running in a pod which cannot talk to the apiserver directly. But in our nightly tests running in a tekton cluster, it fails. The test was also using a golden input to exactly match errors. I modified it to only match the part of errors which we return from our code. Fixes #795 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
- Loading branch information