Page MenuHomeSoftware Heritage

Add set-token command
Changes PlannedPublicDraft

Authored by franckbret on Dec 19 2022, 11:23 AM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

This is a follow up of D8909.
The set-token command prompt the user to fill a token if not provided by
args. It checks the token is valid and then write it to configuration
file.

Related T4590

Diff Detail

Unit TestsFailed

TimeTest
4 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.auth.tests.test_cli::test_auth_generate_token_error
keycloak_oidc = <swh.auth.pytest_plugin.KeycloackOpenIDConnectMock object at 0x7f708ae8d978> mocker = <pytest_mock.plugin.MockerFixture object at 0x7f708af78160> user_credentials = {'password': 'bar', 'username': 'foo'}
6 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.auth.tests.test_cli::test_auth_generate_token_ok
keycloak_oidc = <swh.auth.pytest_plugin.KeycloackOpenIDConnectMock object at 0x7f708ae40588> mocker = <pytest_mock.plugin.MockerFixture object at 0x7f708ae3dda0> user_credentials = {'password': 'bar', 'username': 'foo'}
4 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.auth.tests.test_cli::test_auth_remove_token_error
keycloak_oidc = <swh.auth.pytest_plugin.KeycloackOpenIDConnectMock object at 0x7f708d13aef0> def test_auth_remove_token_error(keycloak_oidc):
4 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.auth.tests.test_cli::test_auth_remove_token_ok
keycloak_oidc = <swh.auth.pytest_plugin.KeycloackOpenIDConnectMock object at 0x7f708b0f5f60> def test_auth_remove_token_ok(keycloak_oidc):
4 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.auth.tests.django.test_backends::test_drf_oidc_auth_invalid_or_missing_auth_type
View Full Test Results (4 Failed · 52 Passed)

Event Timeline

Build has FAILED

Patch application report for D8967 (id=32304)

Rebasing onto bccab2b270...

Current branch diff-target is up to date.
Changes applied before test
commit 0fe9e05713c031a9949b4e6d3e106a0d2544f973
Author: Franck Bret <franck.bret@octobus.net>
Date:   Mon Dec 19 11:14:08 2022 +0100

    Add set-token command
    
    This is a follow up of D8909.
    The set-token command prompt the user to fill a token if not provided by
    args. It checks the token is valid and then write it to configuration
    file.
    
    Related T4590

Link to build: https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/98/
See console output for more information: https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/98/console

Harbormaster returned this revision to the author for changes because remote builds failed.Dec 19 2022, 11:24 AM
Harbormaster failed remote builds in B33259: Diff 32304!

Try to fix previous CI error

Previous commit fail on CI with following error:

10:24:32  >       assert keycloak_oidc.server_url == server_url
10:24:32  E       AssertionError: assert 'http://keycl...eycloak/auth/' == 'http://localhost:5080/auth'
10:24:32  E         - http://localhost:5080/auth
10:24:32  E         + http://keycloak:8080/keycloak/auth/

Build has FAILED

Patch application report for D8967 (id=32305)

Rebasing onto bccab2b270...

Current branch diff-target is up to date.
Changes applied before test
commit 87be31f7ea839916e7c4f8cd2c76c079f93e0aa1
Author: Franck Bret <franck.bret@octobus.net>
Date:   Mon Dec 19 11:14:08 2022 +0100

    Add set-token command
    
    This is a follow up of D8909.
    The set-token command prompt the user to fill a token if not provided by
    args. It checks the token is valid and then write it to configuration
    file.
    
    Related T4590

Link to build: https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/99/
See console output for more information: https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/99/console

Harbormaster returned this revision to the author for changes because remote builds failed.Dec 19 2022, 11:40 AM
Harbormaster failed remote builds in B33260: Diff 32305!