github.com/juju/juju@v0.0.0-20240327075706-a90865de2538/worker/uniter/mock_test.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package uniter_test 5 6 import ( 7 "github.com/juju/names/v5" 8 9 "github.com/juju/juju/core/secrets" 10 "github.com/juju/juju/rpc/params" 11 "github.com/juju/juju/worker/uniter/operation" 12 "github.com/juju/juju/worker/uniter/remotestate" 13 "github.com/juju/juju/worker/uniter/resolver" 14 "github.com/juju/juju/worker/uniter/storage" 15 ) 16 17 type dummyStorageAccessor struct { 18 storage.StorageAccessor 19 } 20 21 func (*dummyStorageAccessor) UnitStorageAttachments(_ names.UnitTag) ([]params.StorageAttachmentId, error) { 22 return nil, nil 23 } 24 25 type dummySecretsAccessor struct { 26 remotestate.SecretsClient 27 } 28 29 func (a *dummySecretsAccessor) SecretMetadata() ([]secrets.SecretOwnerMetadata, error) { 30 return nil, nil 31 } 32 33 func (*dummySecretsAccessor) GetConsumerSecretsRevisionInfo(string, []string) (map[string]secrets.SecretRevisionInfo, error) { 34 return nil, nil 35 } 36 37 type nopResolver struct{} 38 39 func (nopResolver) NextOp(resolver.LocalState, remotestate.Snapshot, operation.Factory) (operation.Operation, error) { 40 return nil, resolver.ErrNoOperation 41 }