Rename execution.Storage to Storer to follow Go convention
Interfaces should be named like someone actively doing a thing. Thus, instead of Storage we use Storer.
This commit is contained in:
@ -37,7 +37,7 @@ type Runner interface {
|
||||
// MappedPorts returns the mapped ports of the runner.
|
||||
MappedPorts() []*dto.MappedPort
|
||||
|
||||
execution.Storage
|
||||
execution.Storer
|
||||
InactivityTimer
|
||||
|
||||
// ExecuteInteractively runs the given execution request and forwards from and to the given reader and writers.
|
||||
@ -60,7 +60,7 @@ type Runner interface {
|
||||
|
||||
// NomadJob is an abstraction to communicate with Nomad environments.
|
||||
type NomadJob struct {
|
||||
execution.Storage
|
||||
execution.Storer
|
||||
InactivityTimer
|
||||
id string
|
||||
portMappings []nomadApi.PortMapping
|
||||
@ -76,7 +76,7 @@ func NewNomadJob(id string, portMappings []nomadApi.PortMapping,
|
||||
id: id,
|
||||
portMappings: portMappings,
|
||||
api: apiClient,
|
||||
Storage: execution.NewLocalStorage(),
|
||||
Storer: execution.NewLocalStorage(),
|
||||
manager: manager,
|
||||
}
|
||||
job.InactivityTimer = NewInactivityTimer(job, manager)
|
||||
|
@ -119,7 +119,7 @@ func (s *ExecuteInteractivelyTestSuite) SetupTest() {
|
||||
s.manager.On("Return", mock.Anything).Return(nil)
|
||||
|
||||
s.runner = &NomadJob{
|
||||
Storage: execution.NewLocalStorage(),
|
||||
Storer: execution.NewLocalStorage(),
|
||||
InactivityTimer: s.timer,
|
||||
id: tests.DefaultRunnerID,
|
||||
api: s.apiMock,
|
||||
@ -225,7 +225,7 @@ func (s *UpdateFileSystemTestSuite) SetupTest() {
|
||||
s.timer.On("ResetTimeout").Return()
|
||||
s.timer.On("TimeoutPassed").Return(false)
|
||||
s.runner = &NomadJob{
|
||||
Storage: execution.NewLocalStorage(),
|
||||
Storer: execution.NewLocalStorage(),
|
||||
InactivityTimer: s.timer,
|
||||
id: tests.DefaultRunnerID,
|
||||
api: s.apiMock,
|
||||
|
Reference in New Issue
Block a user