diff --git a/cmd/cli/configure.go b/cmd/cli/configure.go index 3ab12ee..3e10958 100644 --- a/cmd/cli/configure.go +++ b/cmd/cli/configure.go @@ -22,7 +22,7 @@ func init() { var configureCmd = &cobra.Command{ Use: "configure", - Short: "transforms layer definition configurations in an actual layer definition file", + Short: "Transforms layer definition configurations in an actual layer definition file", Long: `Transforms layer definition configurations in an actual layer definition file. This command is temporary. It will eventually be replaced by a Terraform provider. diff --git a/cmd/cli/kill.go b/cmd/cli/kill.go index e72ee2a..f67c088 100644 --- a/cmd/cli/kill.go +++ b/cmd/cli/kill.go @@ -22,7 +22,7 @@ func init() { var killCmd = &cobra.Command{ Use: "kill ", Args: cobra.MinimumNArgs(2), - Short: "destroys a layer instance", + Short: "Destroys a layer instance", Long: `The kill command destroys a layer instance. Please notice that the kill command cannot destroy a layer instance which has dependants. To delete a layer instance with dependants, you must first delete all of its dependants.`, diff --git a/cmd/cli/output.go b/cmd/cli/output.go index 759f8ad..4535364 100644 --- a/cmd/cli/output.go +++ b/cmd/cli/output.go @@ -22,7 +22,7 @@ func init() { var outputCmd = &cobra.Command{ Use: "output ", Args: cobra.MinimumNArgs(2), - Short: "reads all output variables from the provided layer instance", + Short: "Reads all output variables from the provided layer instance", Long: `The output command reads all output variables from the given layer instance and prints them as json to standard output.`, Run: func(cmd *cobra.Command, args []string) { logger := hclog.Default() diff --git a/cmd/cli/refresh.go b/cmd/cli/refresh.go index 960946c..fae802d 100644 --- a/cmd/cli/refresh.go +++ b/cmd/cli/refresh.go @@ -21,7 +21,7 @@ func init() { var refreshCmd = &cobra.Command{ Use: "refresh ", - Short: "refreshes a layer instance", + Short: "Refreshes a layer instance", Long: `The refresh command updates a layer instance. This command updates the layer instance resources to comply with the current version of the layer definition it belongs to, it also can be used to update values for the layer instance variables.`, diff --git a/cmd/cli/spawn.go b/cmd/cli/spawn.go index 807319c..c06af24 100644 --- a/cmd/cli/spawn.go +++ b/cmd/cli/spawn.go @@ -24,7 +24,7 @@ var alphanumericRegex = regexp.MustCompile("^[A-Za-z0-9][A-Za-z0-9_-]*[A-Za-z0-9 var spawnCmd = &cobra.Command{ Use: "spawn [desired_id]", - Short: "creates a layer instance", + Short: "Creates a layer instance", Long: `The spawn command creates a layer instance. Whenever a desired ID is not provided, Layerform will generate a random UUID for the layer instance. diff --git a/mocks/internal_/storage/FileLike.go b/mocks/internal_/storage/FileLike.go deleted file mode 100644 index 92a0501..0000000 --- a/mocks/internal_/storage/FileLike.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by mockery v2.32.2. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// FileLike is an autogenerated mock type for the FileLike type -type FileLike struct { - mock.Mock -} - -type FileLike_Expecter struct { - mock *mock.Mock -} - -func (_m *FileLike) EXPECT() *FileLike_Expecter { - return &FileLike_Expecter{mock: &_m.Mock} -} - -// Load provides a mock function with given fields: ctx, v -func (_m *FileLike) Load(ctx context.Context, v interface{}) error { - ret := _m.Called(ctx, v) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { - r0 = rf(ctx, v) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// FileLike_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load' -type FileLike_Load_Call struct { - *mock.Call -} - -// Load is a helper method to define mock.On call -// - ctx context.Context -// - v interface{} -func (_e *FileLike_Expecter) Load(ctx interface{}, v interface{}) *FileLike_Load_Call { - return &FileLike_Load_Call{Call: _e.mock.On("Load", ctx, v)} -} - -func (_c *FileLike_Load_Call) Run(run func(ctx context.Context, v interface{})) *FileLike_Load_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(interface{})) - }) - return _c -} - -func (_c *FileLike_Load_Call) Return(_a0 error) *FileLike_Load_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *FileLike_Load_Call) RunAndReturn(run func(context.Context, interface{}) error) *FileLike_Load_Call { - _c.Call.Return(run) - return _c -} - -// Path provides a mock function with given fields: ctx -func (_m *FileLike) Path(ctx context.Context) (string, error) { - ret := _m.Called(ctx) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) string); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FileLike_Path_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Path' -type FileLike_Path_Call struct { - *mock.Call -} - -// Path is a helper method to define mock.On call -// - ctx context.Context -func (_e *FileLike_Expecter) Path(ctx interface{}) *FileLike_Path_Call { - return &FileLike_Path_Call{Call: _e.mock.On("Path", ctx)} -} - -func (_c *FileLike_Path_Call) Run(run func(ctx context.Context)) *FileLike_Path_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *FileLike_Path_Call) Return(_a0 string, _a1 error) *FileLike_Path_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *FileLike_Path_Call) RunAndReturn(run func(context.Context) (string, error)) *FileLike_Path_Call { - _c.Call.Return(run) - return _c -} - -// Save provides a mock function with given fields: ctx, v -func (_m *FileLike) Save(ctx context.Context, v interface{}) error { - ret := _m.Called(ctx, v) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { - r0 = rf(ctx, v) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// FileLike_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' -type FileLike_Save_Call struct { - *mock.Call -} - -// Save is a helper method to define mock.On call -// - ctx context.Context -// - v interface{} -func (_e *FileLike_Expecter) Save(ctx interface{}, v interface{}) *FileLike_Save_Call { - return &FileLike_Save_Call{Call: _e.mock.On("Save", ctx, v)} -} - -func (_c *FileLike_Save_Call) Run(run func(ctx context.Context, v interface{})) *FileLike_Save_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(interface{})) - }) - return _c -} - -func (_c *FileLike_Save_Call) Return(_a0 error) *FileLike_Save_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *FileLike_Save_Call) RunAndReturn(run func(context.Context, interface{}) error) *FileLike_Save_Call { - _c.Call.Return(run) - return _c -} - -// NewFileLike creates a new instance of FileLike. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewFileLike(t interface { - mock.TestingT - Cleanup(func()) -}) *FileLike { - mock := &FileLike{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -}