oidcc icon indicating copy to clipboard operation
oidcc copied to clipboard

Flaky test: test &Oidcc.client_credentials_token/2 works (Oidcc.TokenTest)

Open dustinfarris opened this issue 1 year ago • 1 comments

oidcc version

b3bb1a9e31905ca52f372b963c968acd3b12c640

Erlang version

27.0.1

Elixir version

1.17.2

Summary

There is a flaky test.

Current behavior

occassionally this test fails

  1) test &Oidcc.client_credentials_token/2 works (Oidcc.TokenTest)
     test/oidcc/token_test.exs:211
     match (=) failed
     code:  assert {:ok, %Token{}} =
              Oidcc.Token.client_credentials(
                client_context,
                %{scope: ["openid"]}
              )
     left:  {:ok, %Oidcc.Token{}}
     right: {:error, :no_matching_key}
     stacktrace:
       test/oidcc/token_test.exs:224: (test)

How to reproduce

mix test

Expected behavior

all tests should pass

dustinfarris avatar Oct 23 '24 22:10 dustinfarris

The issues seem to be triggered when Zitadel does not have any keys in the jwks initially since not all tests perform key rotation on a new kid.

maennchen avatar Nov 12 '24 21:11 maennchen