summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-13 12:46:01 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-11-13 12:46:01 +0000
commit14b3033a0d57ba377746896bcc83d1edb9da6f7a (patch)
tree5a599915abfe4567c42206918a51c81307259acd /spec/support
parentf2ef5e2ee8ae46d324e4136dbc95ea40d1f21841 (diff)
downloadgitlab-ce-14b3033a0d57ba377746896bcc83d1edb9da6f7a.tar.gz
Show HTTP response code for Kubernetes errors
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/kubernetes_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/helpers/kubernetes_helpers.rb b/spec/support/helpers/kubernetes_helpers.rb
index a03d9c4045f..35ae04b16c6 100644
--- a/spec/support/helpers/kubernetes_helpers.rb
+++ b/spec/support/helpers/kubernetes_helpers.rb
@@ -41,9 +41,9 @@ module KubernetesHelpers
.to_return(kube_response(kube_v1_secret_body(options)))
end
- def stub_kubeclient_get_secret_error(api_url, name, namespace: 'default')
+ def stub_kubeclient_get_secret_error(api_url, name, namespace: 'default', status: 404)
WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{namespace}/secrets/#{name}")
- .to_return(status: [404, "Internal Server Error"])
+ .to_return(status: [status, "Internal Server Error"])
end
def stub_kubeclient_create_service_account(api_url, namespace: 'default')