canonical / candid

Identity Manager Service
GNU Affero General Public License v3.0
41 stars 29 forks source link

TestTokenNotInStore failure with go 1.21 #193

Open gibmat opened 1 year ago

gibmat commented 1 year ago

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)