Skip to content

Commit

Permalink
Add GitHub auth to various raw.githubusercontent.com downloads for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wbond committed Aug 16, 2021
1 parent 2ea8653 commit cfaaeb5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
3 changes: 2 additions & 1 deletion package_control/tests/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def github_settings(self):
'cache_length': 604800,
'user_agent': USER_AGENT,
'http_basic_auth': {
'api.github.com': [GH_USER, GH_PASS]
'api.github.com': [GH_USER, GH_PASS],
'raw.githubusercontent.com': [GH_USER, GH_PASS],
}
}

Expand Down
7 changes: 5 additions & 2 deletions package_control/tests/downloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ..downloaders.downloader_exception import DownloaderException
from ..http_cache import HttpCache

from ._config import USER_AGENT, DEBUG
from ._config import USER_AGENT, DEBUG, GH_USER, GH_PASS


class DownloaderTestsMixin:
Expand All @@ -16,7 +16,10 @@ def downloader(self, cache_length=604800):
'debug': DEBUG,
'cache': HttpCache(cache_length),
'cache_length': cache_length,
'user_agent': USER_AGENT
'user_agent': USER_AGENT,
'http_basic_auth': {
'raw.githubusercontent.com': [GH_USER, GH_PASS],
}
})
return self._downloader

Expand Down
14 changes: 10 additions & 4 deletions package_control/tests/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def github_settings(self):
'cache_length': 604800,
'user_agent': USER_AGENT,
'http_basic_auth': {
'api.github.com': [GH_USER, GH_PASS]
'api.github.com': [GH_USER, GH_PASS],
'raw.githubusercontent.com': [GH_USER, GH_PASS],
}
}

Expand Down Expand Up @@ -148,7 +149,8 @@ def github_settings(self):
'cache_length': 604800,
'user_agent': USER_AGENT,
'http_basic_auth': {
'api.github.com': [GH_USER, GH_PASS]
'api.github.com': [GH_USER, GH_PASS],
'raw.githubusercontent.com': [GH_USER, GH_PASS],
}
}

Expand Down Expand Up @@ -548,8 +550,9 @@ def settings(self):
'cache': HttpCache(604800),
'http_basic_auth': {
'api.github.com': [GH_USER, GH_PASS],
'raw.githubusercontent.com': [GH_USER, GH_PASS],
'gitlab.com': [GL_USER, GL_PASS],
'api.bitbucket.org': [BB_USER, BB_PASS]
'api.bitbucket.org': [BB_USER, BB_PASS],
}
}

Expand Down Expand Up @@ -1357,7 +1360,10 @@ def settings(self):
'debug': DEBUG,
'cache': HttpCache(604800),
'cache_length': 604800,
'user_agent': USER_AGENT
'user_agent': USER_AGENT,
'http_basic_auth': {
'raw.githubusercontent.com': [GH_USER, GH_PASS],
}
}

def test_get_name_map_12(self):
Expand Down

0 comments on commit cfaaeb5

Please sign in to comment.