Allow use of basic auth for security scan endpoints

This will allow the security labeler to send a pull secret to retrieve security information for a manifest

Fixes https://jira.coreos.com/browse/QUAY-1087
This commit is contained in:
Joseph Schorr 2018-09-21 13:54:33 -04:00
parent f9da0caaa4
commit a38edea11b
4 changed files with 37 additions and 2 deletions

View file

@ -1,10 +1,11 @@
from endpoints.test.shared import conduct_call
from endpoints.api import api
def conduct_api_call(client, resource, method, params, body=None, expected_code=200):
def conduct_api_call(client, resource, method, params, body=None, expected_code=200, headers=None):
""" Conducts an API call to the given resource via the given client, and ensures its returned
status matches the code given.
Returns the response.
"""
return conduct_call(client, resource, api.url_for, method, params, body, expected_code)
return conduct_call(client, resource, api.url_for, method, params, body, expected_code,
headers=headers)