github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/apiserver/common/crossmodel/package_test.go (about)

     1  // Copyright 2017 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package crossmodel
     5  
     6  import (
     7  	"testing"
     8  
     9  	"github.com/juju/clock"
    10  	gc "gopkg.in/check.v1"
    11  
    12  	"github.com/juju/juju/apiserver/authentication"
    13  )
    14  
    15  //go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/authentication_mock.go github.com/juju/juju/apiserver/authentication ExpirableStorageBakery
    16  //go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/bakerystorage_mock.go github.com/juju/juju/state/bakerystorage BakeryConfig,ExpirableStorage
    17  //go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/bakery_mock.go github.com/go-macaroon-bakery/macaroon-bakery/v3/bakery FirstPartyCaveatChecker
    18  //go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/http_mock.go net/http RoundTripper
    19  //go:generate go run go.uber.org/mock/mockgen -package mocks -destination mocks/crossmodel_mock.go github.com/juju/juju/apiserver/common/crossmodel OfferBakeryInterface,Backend
    20  
    21  func TestAll(t *testing.T) {
    22  	gc.TestingT(t)
    23  }
    24  
    25  func (o *OfferBakery) SetBakery(bakery authentication.ExpirableStorageBakery) {
    26  	o.bakery = bakery
    27  }
    28  
    29  func (o *AuthContext) SetClock(clk clock.Clock) {
    30  	o.offerBakery.setClock(clk)
    31  }