Add a banner to the Quay UI when an app specific token is about to expire
This commit is contained in:
parent
5b4f5f9859
commit
888b564a9b
9 changed files with 60 additions and 9 deletions
|
@ -17,7 +17,7 @@ def test_valid_robot(app):
|
|||
assert result == ValidateResult(AuthKind.credentials, robot=robot)
|
||||
|
||||
def test_valid_robot_for_disabled_user(app):
|
||||
user = model.user.get_user('devtable')
|
||||
user = model.user.get_user('devtable')
|
||||
user.enabled = False
|
||||
user.save()
|
||||
|
||||
|
@ -50,7 +50,7 @@ def test_invalid_user(app):
|
|||
def test_valid_app_specific_token(app):
|
||||
user = model.user.get_user('devtable')
|
||||
app_specific_token = model.appspecifictoken.create_token(user, 'some token')
|
||||
|
||||
|
||||
result, kind = validate_credentials(APP_SPECIFIC_TOKEN_USERNAME, app_specific_token.token_code)
|
||||
assert kind == CredentialKind.app_specific_token
|
||||
assert result == ValidateResult(AuthKind.credentials, appspecifictoken=app_specific_token)
|
||||
|
|
Reference in a new issue