diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-01 14:22:50 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-01 14:57:04 +0100 |
commit | bc4cf3160f653fd5fbc368a42128945379291208 (patch) | |
tree | 1988dfff6de688e3308abc0336d822f4affc9b86 /test/unit/test_gitlab.py | |
parent | workflows/ci: upgrade an action (diff) | |
download | cgitize-bc4cf3160f653fd5fbc368a42128945379291208.tar.gz cgitize-bc4cf3160f653fd5fbc368a42128945379291208.zip |
workflows/ci: use GitHub token for unit tests
For some reason, unit tests started failing during CI runs.
Diffstat (limited to 'test/unit/test_gitlab.py')
-rw-r--r-- | test/unit/test_gitlab.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/test_gitlab.py b/test/unit/test_gitlab.py index d37c06c..04a8f71 100644 --- a/test/unit/test_gitlab.py +++ b/test/unit/test_gitlab.py @@ -3,6 +3,7 @@ # For details, see https://github.com/egor-tensin/cgitize. # Distributed under the MIT License. +import os import unittest from gitlab import Gitlab @@ -11,7 +12,9 @@ from gitlab.exceptions import GitlabGetError class GitLabTests(unittest.TestCase): def setUp(self): - self.gitlab = Gitlab('https://gitlab.com') + self.gitlab = Gitlab( + 'https://gitlab.com', + private_token=os.environ.get('CGITIZE_GITLAB_TOKEN')) def test_nonexistent_repo(self): with self.assertRaises(GitlabGetError): |