From ac43f2360fe68d3b4be0497636e7980184edb1a5 Mon Sep 17 00:00:00 2001 From: Matthew F Leader Date: Mon, 26 Aug 2024 13:18:22 -0400 Subject: [PATCH 1/3] remove dead mock code --- mocks/mock_ce_client/mock_ce_client.go | 76 -------------------------- 1 file changed, 76 deletions(-) delete mode 100644 mocks/mock_ce_client/mock_ce_client.go diff --git a/mocks/mock_ce_client/mock_ce_client.go b/mocks/mock_ce_client/mock_ce_client.go deleted file mode 100644 index baa65706..00000000 --- a/mocks/mock_ce_client/mock_ce_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: internal/ce_client/ce_client.go - -// Package mocks is a generated GoMock package. -package mocks - -import ( - reflect "reflect" - - gomock "go.uber.org/mock/gomock" -) - -// MockContainerEngineClient is a mock of ContainerEngineClient interface. -type MockContainerEngineClient struct { - ctrl *gomock.Controller - recorder *MockContainerEngineClientMockRecorder -} - -// MockContainerEngineClientMockRecorder is the mock recorder for MockContainerEngineClient. -type MockContainerEngineClientMockRecorder struct { - mock *MockContainerEngineClient -} - -// NewMockContainerEngineClient creates a new mock instance. -func NewMockContainerEngineClient(ctrl *gomock.Controller) *MockContainerEngineClient { - mock := &MockContainerEngineClient{ctrl: ctrl} - mock.recorder = &MockContainerEngineClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockContainerEngineClient) EXPECT() *MockContainerEngineClientMockRecorder { - return m.recorder -} - -// Build mocks base method. -func (m *MockContainerEngineClient) Build(filepath, name string, tags []string, quay_img_exp string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Build", filepath, name, tags) - ret0, _ := ret[0].(error) - return ret0 -} - -// Build indicates an expected call of Build. -func (mr *MockContainerEngineClientMockRecorder) Build(filepath, name, tags interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockContainerEngineClient)(nil).Build), filepath, name, tags) -} - -// Push mocks base method. -func (m *MockContainerEngineClient) Push(destination, username, password, registry_address string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Push", destination, username, password, registry_address) - ret0, _ := ret[0].(error) - return ret0 -} - -// Push indicates an expected call of Push. -func (mr *MockContainerEngineClientMockRecorder) Push(destination, username, password, registry_address interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Push", reflect.TypeOf((*MockContainerEngineClient)(nil).Push), destination, username, password, registry_address) -} - -// Tag mocks base method. -func (m *MockContainerEngineClient) Tag(image_tag, destination string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Tag", image_tag, destination) - ret0, _ := ret[0].(error) - return ret0 -} - -// Tag indicates an expected call of Tag. -func (mr *MockContainerEngineClientMockRecorder) Tag(image_tag, destination interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockContainerEngineClient)(nil).Tag), image_tag, destination) -} From 937ac89601f9f52b69d40409378e007cf4d8c4f6 Mon Sep 17 00:00:00 2001 From: Matthew F Leader Date: Mon, 9 Sep 2024 14:31:45 -0400 Subject: [PATCH 2/3] doc generating mocks --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..4c96dd27 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing + +## Generating Mocks + +As of writing, the mock objects are generated in this project's `mock` directory. When a given component is altered and its test suite depends upon a mock object new mocks need to be generated in the `mock` directory to replace the now outdated mocks. + +To generate new mocks, while in this project's root directory execute this command: + +```shell +go generate ./... +``` From 88164f16bae2c12a0dcd3544e1001c99553f22cb Mon Sep 17 00:00:00 2001 From: Matthew F Leader Date: Mon, 9 Sep 2024 17:05:35 -0400 Subject: [PATCH 3/3] delete a phrase --- CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4c96dd27..dabe88a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,9 +2,12 @@ ## Generating Mocks -As of writing, the mock objects are generated in this project's `mock` directory. When a given component is altered and its test suite depends upon a mock object new mocks need to be generated in the `mock` directory to replace the now outdated mocks. +Mock objects are generated in this project's `mock` directory. When a given +component is altered and its test suite depends upon a mock object new mocks +need to be generated in the `mock` directory to replace the now outdated mocks. -To generate new mocks, while in this project's root directory execute this command: +To generate new mocks, while in this project's root directory execute this +command: ```shell go generate ./...