github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/worker/uniter/runner/jujuc/restricted_test.go (about)

     1  // Copyright 2012-2014 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package jujuc_test
     5  
     6  import (
     7  	"github.com/juju/loggo"
     8  
     9  	"github.com/juju/juju/worker/uniter/runner/jujuc"
    10  )
    11  
    12  type restrictedContext struct {
    13  	*jujuc.RestrictedContext
    14  }
    15  
    16  // UnitName completes the hooks.Context implementation, which the
    17  // RestrictedContext leaves out.
    18  func (*restrictedContext) UnitName() string { return "restricted" }
    19  
    20  func (r *restrictedContext) GetLogger(m string) loggo.Logger {
    21  	return loggo.GetLogger(m)
    22  }
    23  
    24  var _ jujuc.Context = (*restrictedContext)(nil)