diff --git a/worker/firewaller/firewaller_test.go b/worker/firewaller/firewaller_test.go index 625e95b59708..e2377e70f56d 100644 --- a/worker/firewaller/firewaller_test.go +++ b/worker/firewaller/firewaller_test.go @@ -1038,18 +1038,19 @@ func (s *InstanceModeSuite) TestRemoteRelationProviderRoleConsumingSide(c *gc.C) c.Check(version, gc.Equals, 0) c.Check(id, gc.Equals, "") c.Check(request, gc.Equals, "WatchEgressAddressesForRelations") + + rArgs := arg.(params.RemoteEntityArgs) + newMac := rArgs.Args[0].Macaroons[0] + apitesting.MacaroonEquals(c, newMac, mac) + + rArgs.Args[0].Macaroons = nil expected := params.RemoteEntityArgs{ Args: []params.RemoteEntityArg{{ Token: relToken, }}, } - // Extract macaroons so we can compare them separately - // (as they can't be compared using DeepEquals due to 'UnmarshaledAs') - rArgs := arg.(params.RemoteEntityArgs) - newMacs := rArgs.Args[0].Macaroons - rArgs.Args[0].Macaroons = nil - apitesting.MacaroonEquals(c, newMacs[0], mac) c.Check(arg, gc.DeepEquals, expected) + c.Assert(result, gc.FitsTypeOf, ¶ms.StringsWatchResults{}) *(result.(*params.StringsWatchResults)) = params.StringsWatchResults{ Results: []params.StringsWatchResult{{StringsWatcherId: "1"}},