Skip to content

Commit

Permalink
Adapt name
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Oct 11, 2023
1 parent da759f4 commit ed15e24
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cloud_info_provider/auth_refreshers/access_token.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from cloud_info_provider import auth_refreshers


class AccessTokenRefresh(auth_refreshers.OidcBaseRefresher):
class AccessToken(auth_refreshers.OidcBaseRefresher):
"""Just uses the access token available at the auth configuration"""

def refresh(self, provider, access_token=None, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions cloud_info_provider/tests/test_auth_refreshers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from cloud_info_provider.tests import base


class AccessTokenRefreshTest(base.TestCase):
class AccessTokenTest(base.TestCase):
def test_refresh(self):
class FakeProvider(object):
def __init__(self):
self.opts = mock.Mock()

provider = FakeProvider()
refresher = access_token.AccessTokenRefresh(None)
refresher = access_token.AccessToken(None)
token = "this token"
refresher.refresh(provider, access_token=token, ignore=True)
self.assertEqual("this token", provider.opts.os_access_token)
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ cip.collectors =
cip.auth_refreshers =
oidcrefresh = cloud_info_provider.auth_refreshers.oidc_refresh:OidcRefreshToken
oidcvorefresh = cloud_info_provider.auth_refreshers.oidc_vo_refresh:OidcVORefreshToken
accesstoken = cloud_info_provider.auth_refreshers.access_token:AccessToken
cip.publishers =
stdout = cloud_info_provider.publishers.stdout:StdOutPublisher
ams = cloud_info_provider.publishers.ams:AMSPublisher
Expand Down

0 comments on commit ed15e24

Please sign in to comment.