diff --git a/conf/git.yaml.template b/conf/git.yaml.template index 27b478d2325..ad2e5e244de 100644 --- a/conf/git.yaml.template +++ b/conf/git.yaml.template @@ -4,3 +4,4 @@ GIT: SSH_PORT: 22 HTTP_PORT: 80 HOSTNAME: localhost + GITHUB_TOKEN: diff --git a/tests/foreman/api/test_templatesync.py b/tests/foreman/api/test_templatesync.py index 88114b60b36..270a85a305f 100644 --- a/tests/foreman/api/test_templatesync.py +++ b/tests/foreman/api/test_templatesync.py @@ -1100,6 +1100,7 @@ def test_positive_import_all_templates_from_repo(self, module_org): ) res = requests.get( url=f"{FOREMAN_TEMPLATE_IMPORT_API_URL}/git/trees/master", + headers={'Authorization': f'token {settings.git.github_token}'}, params={'recursive': True}, ) res.raise_for_status() @@ -1146,6 +1147,7 @@ def test_negative_import_locked_template(self, module_org): assert not output['message']['templates'][0]['imported'] res = requests.get( url=f"{FOREMAN_TEMPLATE_IMPORT_API_URL}/contents/locked/robottelo_locked.erb", + headers={'Authorization': f'token {settings.git.github_token}'}, params={'ref': 'locked'}, ) res.raise_for_status() @@ -1196,6 +1198,7 @@ def test_positive_import_locked_template(self, module_org): assert output['message']['templates'][0]['changed'] res = requests.get( url=f"{FOREMAN_TEMPLATE_IMPORT_API_URL}/contents/after_lock/robottelo_locked.erb", + headers={'Authorization': f'token {settings.git.github_token}'}, params={'ref': 'locked'}, ) res.raise_for_status()