Skip to content

Commit

Permalink
add token for github api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Dragun authored and mshriver committed Feb 1, 2022
1 parent b67c9f0 commit 6872f04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/git.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ GIT:
SSH_PORT: 22
HTTP_PORT: 80
HOSTNAME: localhost
GITHUB_TOKEN:
3 changes: 3 additions & 0 deletions tests/foreman/api/test_templatesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 6872f04

Please sign in to comment.