Changes to the context package in go 1.21 are causing TestTokenNotInStore to fail:
=== RUN TestTokenNotInStore
ussologin_test.go:122:
error:
cannot handle unexported field at {[]testing.StubCall}[0].Args[0].(context.backgroundCtx).emptyCtx:
"context".backgroundCtx
consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported
got:
[]testing.StubCall{
{
FuncName: "GetToken",
Args: {
context.backgroundCtx{},
},
},
}
want:
<same as "got">
stack:
/build/golang-github-canonical-candid-1.12.2/_build/src/github.com/canonical/candid/candidclient/ussologin/ussologin_test.go:122
c.Assert(fg.Calls(), qt.DeepEquals, []jt.StubCall{{
FuncName: "GetToken",
Args: []interface{}{ctx},
}})
--- FAIL: TestTokenNotInStore (0.00s)
Changes to the
context
package in go 1.21 are causing TestTokenNotInStore to fail: