Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.auth.tests.test_cli::test_auth_generate_token_error
Failed

TEST RESULT

Run At
Dec 19 2022, 11:24 AM
Details
keycloak_oidc = <swh.auth.pytest_plugin.KeycloackOpenIDConnectMock object at 0x7f9ba58e5c50> mocker = <pytest_mock.plugin.MockerFixture object at 0x7f9ba58e5dd8> user_credentials = {'password': 'bar', 'username': 'foo'} def test_auth_generate_token_error(keycloak_oidc, mocker, user_credentials): keycloak_oidc.set_auth_success(False) mock_getpass = mocker.patch("getpass.getpass") mock_getpass.return_value = user_credentials["password"] command = ["generate-token", user_credentials["username"]] result = _run_auth_command( > command, keycloak_oidc, input=f"{user_credentials['password']}\n" ) .tox/py3/lib/python3.7/site-packages/swh/auth/tests/test_cli.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ command = ['generate-token', 'foo'] keycloak_oidc = <swh.auth.pytest_plugin.KeycloackOpenIDConnectMock object at 0x7f9ba58e5c50> input = 'bar\n' def _run_auth_command(command, keycloak_oidc, input=None): server_url = "http://localhost:5080/auth" realm_name = "realm-test" client_id = "client-test" result = runner.invoke( auth, [ "--oidc-server-url", server_url, "--realm-name", realm_name, "--client-id", client_id, *command, ], input=input, ) > assert keycloak_oidc.server_url == server_url E AssertionError: assert 'http://keycl...eycloak/auth/' == 'http://localhost:5080/auth' E - http://localhost:5080/auth E + http://keycloak:8080/keycloak/auth/ .tox/py3/lib/python3.7/site-packages/swh/auth/tests/test_cli.py:45: AssertionError