Repository: favonia/cloudflare-ddns
Pull request #260 (2022-11-11 15:36:30)

build: commit files generated by mockgen

codecov[bot]: # [Codecov](https://codecov.io/gh/favonia/cloudflare-ddns/pull/260?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) Report
> Merging [#260](https://codecov.io/gh/favonia/cloudflare-ddns/pull/260?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) (96f6d12) into [main](https://codecov.io/gh/favonia/cloudflare-ddns/commit/3da42d954683eeddb7e989291bedc79689261b36?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) (3da42d9) will **not change** coverage.
> The diff coverage is `n/a`.

```diff
@@           Coverage Diff           @@
##             main     #260   +/-   ##
=======================================
  Coverage   85.35%   85.35%           
=======================================
  Files          29       29           
  Lines        1946     1946           
=======================================
  Hits         1661     1661           
  Misses        274      274           
  Partials       11       11           
```

| Flag | Coverage Δ | |
|---|---|---|
| unittests | `85.35% <ø> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia#carryforward-flags-in-the-pull-request-comment) to find out more.


:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia)


Patch:
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 3479541..41b2b8d 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -1,4 +1,5 @@
 name: Docker
+
 on:
   push:
     branches:
@@ -6,9 +7,11 @@ on:
   pull_request:
   release:
     types: [published]
+
 env:
   platforms: "linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/riscv64,linux/s390x"
-permissions: # added using https://github.com/step-security/secure-workflows
+
+permissions:
   contents: read
 
 jobs:
diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml
index 918ba13..30a0bf7 100644
--- a/.github/workflows/golangci-lint.yaml
+++ b/.github/workflows/golangci-lint.yaml
@@ -1,9 +1,11 @@
 name: golangci-lint
+
 on:
   push:
     branches: ["main"]
   pull_request:
-permissions: # added using https://github.com/step-security/secure-workflows
+
+permissions:
   contents: read
 
 jobs:
@@ -31,11 +33,6 @@ jobs:
       - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
         with:
           persist-credentials: false
-      - run: |
-          go install github.com/golang/mock/mockgen@v1.6.0
-          go generate ./...
       - uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1
         with:
           version: v1.50
-          skip-pkg-cache: true
-          skip-build-cache: true
diff --git a/internal/mocks/.gitignore b/internal/mocks/.gitignore
deleted file mode 100644
index 72e8ffc..0000000
--- a/internal/mocks/.gitignore
+++ /dev/null
@@ -1,1 +0,0 @@
-*
diff --git a/internal/mocks/mock_api.go b/internal/mocks/mock_api.go
new file mode 100644
index 0000000..8692437
--- /dev/null
+++ b/internal/mocks/mock_api.go
@@ -0,0 +1,110 @@
+// Code generated by MockGen. DO NOT EDIT.
+// Source: github.com/favonia/cloudflare-ddns/internal/api (interfaces: Handle)
+
+// Package mocks is a generated GoMock package.
+package mocks
+
+import (
+	context "context"
+	netip "net/netip"
+	reflect "reflect"
+
+	api "github.com/favonia/cloudflare-ddns/internal/api"
+	domain "github.com/favonia/cloudflare-ddns/internal/domain"
+	ipnet "github.com/favonia/cloudflare-ddns/internal/ipnet"
+	pp "github.com/favonia/cloudflare-ddns/internal/pp"
+	gomock "github.com/golang/mock/gomock"
+)
+
+// MockHandle is a mock of Handle interface.
+type MockHandle struct {
+	ctrl     *gomock.Controller
+	recorder *MockHandleMockRecorder
+}
+
+// MockHandleMockRecorder is the mock recorder for MockHandle.
+type MockHandleMockRecorder struct {
+	mock *MockHandle
+}
+
+// NewMockHandle creates a new mock instance.
+func NewMockHandle(ctrl *gomock.Controller) *MockHandle {
+	mock := &MockHandle{ctrl: ctrl}
+	mock.recorder = &MockHandleMockRecorder{mock}
+	return mock
+}
+
+// EXPECT returns an object that allows the caller to indicate expected use.
+func (m *MockHandle) EXPECT() *MockHandleMockRecorder {
+	return m.recorder
+}
+
+// CreateRecord mocks base method.
+func (m *MockHandle) CreateRecord(arg0 context.Context, arg1 pp.PP, arg2 domain.Domain, arg3 ipnet.Type, arg4 netip.Addr, arg5 api.TTL, arg6 bool) (string, bool) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "CreateRecord", arg0, arg1, arg2, arg3, arg4, arg5, arg6)
+	ret0, _ := ret[0].(string)
+	ret1, _ := ret[1].(bool)
+	return ret0, ret1
+}
+
+// CreateRecord indicates an expected call of CreateRecord.
+func (mr *MockHandleMockRecorder) CreateRecord(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRecord", reflect.TypeOf((*MockHandle)(nil).CreateRecord), arg0, arg1, arg2, arg3, arg4, arg5, arg6)
+}
+
+// DeleteRecord mocks base method.
+func (m *MockHandle) DeleteRecord(arg0 context.Context, arg1 pp.PP, arg2 domain.Domain, arg3 ipnet.Type, arg4 string) bool {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "DeleteRecord", arg0, arg1, arg2, arg3, arg4)
+	ret0, _ := ret[0].(bool)
+	return ret0
+}
+
+// DeleteRecord indicates an expected call of DeleteRecord.
+func (mr *MockHandleMockRecorder) DeleteRecord(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRecord", reflect.TypeOf((*MockHandle)(nil).DeleteRecord), arg0, arg1, arg2, arg3, arg4)
+}
+
+// FlushCache mocks base method.
+func (m *MockHandle) FlushCache() {
+	m.ctrl.T.Helper()
+	m.ctrl.Call(m, "FlushCache")
+}
+
+// FlushCache indicates an expected call of FlushCache.
+func (mr *MockHandleMockRecorder) FlushCache() *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FlushCache", reflect.TypeOf((*MockHandle)(nil).FlushCache))
+}
+
+// ListRecords mocks base method.
+func (m *MockHandle) ListRecords(arg0 context.Context, arg1 pp.PP, arg2 domain.Domain, arg3 ipnet.Type) (map[string]netip.Addr, bool) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ListRecords", arg0, arg1, arg2, arg3)
+	ret0, _ := ret[0].(map[string]netip.Addr)
+	ret1, _ := ret[1].(bool)
+	return ret0, ret1
+}
+
+// ListRecords indicates an expected call of ListRecords.
+func (mr *MockHandleMockRecorder) ListRecords(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRecords", reflect.TypeOf((*MockHandle)(nil).ListRecords), arg0, arg1, arg2, arg3)
+}
+
+// UpdateRecord mocks base method.
+func (m *MockHandle) UpdateRecord(arg0 context.Context, arg1 pp.PP, arg2 domain.Domain, arg3 ipnet.Type, arg4 string, arg5 netip.Addr) bool {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "UpdateRecord", arg0, arg1, arg2, arg3, arg4, arg5)
+	ret0, _ := ret[0].(bool)
+	return ret0
+}
+
+// UpdateRecord indicates an expected call of UpdateRecord.
+func (mr *MockHandleMockRecorder) UpdateRecord(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRecord", reflect.TypeOf((*MockHandle)(nil).UpdateRecord), arg0, arg1, arg2, arg3, arg4, arg5)
+}
diff --git a/internal/mocks/mock_monitor.go b/internal/mocks/mock_monitor.go
new file mode 100644
index 0000000..7cd1b41
--- /dev/null
+++ b/internal/mocks/mock_monitor.go
@@ -0,0 +1,106 @@
+// Code generated by MockGen. DO NOT EDIT.
+// Source: github.com/favonia/cloudflare-ddns/internal/monitor (interfaces: Monitor)
+
+// Package mocks is a generated GoMock package.
+package mocks
+
+import (
+	context "context"
+	reflect "reflect"
+
+	pp "github.com/favonia/cloudflare-ddns/internal/pp"
+	gomock "github.com/golang/mock/gomock"
+)
+
+// MockMonitor is a mock of Monitor interface.
+type MockMonitor struct {
+	ctrl     *gomock.Controller
+	recorder *MockMonitorMockRecorder
+}
+
+// MockMonitorMockRecorder is the mock recorder for MockMonitor.
+type MockMonitorMockRecorder struct {
+	mock *MockMonitor
+}
+
+// NewMockMonitor creates a new mock instance.
+func NewMockMonitor(ctrl *gomock.Controller) *MockMonitor {
+	mock := &MockMonitor{ctrl: ctrl}
+	mock.recorder = &MockMonitorMockRecorder{mock}
+	return mock
+}
+
+// EXPECT returns an object that allows the caller to indicate expected use.
+func (m *MockMonitor) EXPECT() *MockMonitorMockRecorder {
+	return m.recorder
+}
+
+// DescribeService mocks base method.
+func (m *MockMonitor) DescribeService() string {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "DescribeService")
+	ret0, _ := ret[0].(string)
+	return ret0
+}
+
+// DescribeService indicates an expected call of DescribeService.
+func (mr *MockMonitorMockRecorder) DescribeService() *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeService", reflect.TypeOf((*MockMonitor)(nil).DescribeService))
+}
+
+// ExitStatus mocks base method.
+func (m *MockMonitor) ExitStatus(arg0 context.Context, arg1 pp.PP, arg2 int) bool {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ExitStatus", arg0, arg1, arg2)
+	ret0, _ := ret[0].(bool)
+	return ret0
+}
+
+// ExitStatus indicates an expected call of ExitStatus.
+func (mr *MockMonitorMockRecorder) ExitStatus(arg0, arg1, arg2 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExitStatus", reflect.TypeOf((*MockMonitor)(nil).ExitStatus), arg0, arg1, arg2)
+}
+
+// Failure mocks base method.
+func (m *MockMonitor) Failure(arg0 context.Context, arg1 pp.PP) bool {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "Failure", arg0, arg1)
+	ret0, _ := ret[0].(bool)
+	return ret0
+}
+
+// Failure indicates an expected call of Failure.
+func (mr *MockMonitorMockRecorder) Failure(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Failure", reflect.TypeOf((*MockMonitor)(nil).Failure), arg0, arg1)
+}
+
+// Start mocks base method.
+func (m *MockMonitor) Start(arg0 context.Context, arg1 pp.PP) bool {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "Start", arg0, arg1)
+	ret0, _ := ret[0].(bool)
+	return ret0
+}
+
+// Start indicates an expected call of Start.
+func (mr *MockMonitorMockRecorder) Start(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockMonitor)(nil).Start), arg0, arg1)
+}
+
+// Success mocks base method.
+func (m *MockMonitor) Success(arg0 context.Context, arg1 pp.PP) bool {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "Success", arg0, arg1)
+	ret0, _ := ret[0].(bool)
+	return ret0
+}
+
+// Success indicates an expected call of Success.
+func (mr *MockMonitorMockRecorder) Success(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Success", reflect.TypeOf((*MockMonitor)(nil).Success), arg0, arg1)
+}
diff --git a/internal/mocks/mock_pp.go b/internal/mocks/mock_pp.go
new file mode 100644
index 0000000..81e2845
--- /dev/null
+++ b/internal/mocks/mock_pp.go
@@ -0,0 +1,145 @@
+// Code generated by MockGen. DO NOT EDIT.
+// Source: github.com/favonia/cloudflare-ddns/internal/pp (interfaces: PP)
+
+// Package mocks is a generated GoMock package.
+package mocks
+
+import (
+	reflect "reflect"
+
+	pp "github.com/favonia/cloudflare-ddns/internal/pp"
+	gomock "github.com/golang/mock/gomock"
+)
+
+// MockPP is a mock of PP interface.
+type MockPP struct {
+	ctrl     *gomock.Controller
+	recorder *MockPPMockRecorder
+}
+
+// MockPPMockRecorder is the mock recorder for MockPP.
+type MockPPMockRecorder struct {
+	mock *MockPP
+}
+
+// NewMockPP creates a new mock instance.
+func NewMockPP(ctrl *gomock.Controller) *MockPP {
+	mock := &MockPP{ctrl: ctrl}
+	mock.recorder = &MockPPMockRecorder{mock}
+	return mock
+}
+
+// EXPECT returns an object that allows the caller to indicate expected use.
+func (m *MockPP) EXPECT() *MockPPMockRecorder {
+	return m.recorder
+}
+
+// Errorf mocks base method.
+func (m *MockPP) Errorf(arg0 pp.Emoji, arg1 string, arg2 ...interface{}) {
+	m.ctrl.T.Helper()
+	varargs := []interface{}{arg0, arg1}
+	for _, a := range arg2 {
+		varargs = append(varargs, a)
+	}
+	m.ctrl.Call(m, "Errorf", varargs...)
+}
+
+// Errorf indicates an expected call of Errorf.
+func (mr *MockPPMockRecorder) Errorf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	varargs := append([]interface{}{arg0, arg1}, arg2...)
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Errorf", reflect.TypeOf((*MockPP)(nil).Errorf), varargs...)
+}
+
+// IncIndent mocks base method.
+func (m *MockPP) IncIndent() pp.PP {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "IncIndent")
+	ret0, _ := ret[0].(pp.PP)
+	return ret0
+}
+
+// IncIndent indicates an expected call of IncIndent.
+func (mr *MockPPMockRecorder) IncIndent() *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncIndent", reflect.TypeOf((*MockPP)(nil).IncIndent))
+}
+
+// Infof mocks base method.
+func (m *MockPP) Infof(arg0 pp.Emoji, arg1 string, arg2 ...interface{}) {
+	m.ctrl.T.Helper()
+	varargs := []interface{}{arg0, arg1}
+	for _, a := range arg2 {
+		varargs = append(varargs, a)
+	}
+	m.ctrl.Call(m, "Infof", varargs...)
+}
+
+// Infof indicates an expected call of Infof.
+func (mr *MockPPMockRecorder) Infof(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	varargs := append([]interface{}{arg0, arg1}, arg2...)
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Infof", reflect.TypeOf((*MockPP)(nil).Infof), varargs...)
+}
+
+// IsEnabledFor mocks base method.
+func (m *MockPP) IsEnabledFor(arg0 pp.Level) bool {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "IsEnabledFor", arg0)
+	ret0, _ := ret[0].(bool)
+	return ret0
+}
+
+// IsEnabledFor indicates an expected call of IsEnabledFor.
+func (mr *MockPPMockRecorder) IsEnabledFor(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsEnabledFor", reflect.TypeOf((*MockPP)(nil).IsEnabledFor), arg0)
+}
+
+// Noticef mocks base method.
+func (m *MockPP) Noticef(arg0 pp.Emoji, arg1 string, arg2 ...interface{}) {
+	m.ctrl.T.Helper()
+	varargs := []interface{}{arg0, arg1}
+	for _, a := range arg2 {
+		varargs = append(varargs, a)
+	}
+	m.ctrl.Call(m, "Noticef", varargs...)
+}
+
+// Noticef indicates an expected call of Noticef.
+func (mr *MockPPMockRecorder) Noticef(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	varargs := append([]interface{}{arg0, arg1}, arg2...)
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Noticef", reflect.TypeOf((*MockPP)(nil).Noticef), varargs...)
+}
+
+// SetLevel mocks base method.
+func (m *MockPP) SetLevel(arg0 pp.Level) pp.PP {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "SetLevel", arg0)
+	ret0, _ := ret[0].(pp.PP)
+	return ret0
+}
+
+// SetLevel indicates an expected call of SetLevel.
+func (mr *MockPPMockRecorder) SetLevel(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLevel", reflect.TypeOf((*MockPP)(nil).SetLevel), arg0)
+}
+
+// Warningf mocks base method.
+func (m *MockPP) Warningf(arg0 pp.Emoji, arg1 string, arg2 ...interface{}) {
+	m.ctrl.T.Helper()
+	varargs := []interface{}{arg0, arg1}
+	for _, a := range arg2 {
+		varargs = append(varargs, a)
+	}
+	m.ctrl.Call(m, "Warningf", varargs...)
+}
+
+// Warningf indicates an expected call of Warningf.
+func (mr *MockPPMockRecorder) Warningf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	varargs := append([]interface{}{arg0, arg1}, arg2...)
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warningf", reflect.TypeOf((*MockPP)(nil).Warningf), varargs...)
+}
diff --git a/internal/mocks/mock_provider.go b/internal/mocks/mock_provider.go
new file mode 100644
index 0000000..15dbad9
--- /dev/null
+++ b/internal/mocks/mock_provider.go
@@ -0,0 +1,66 @@
+// Code generated by MockGen. DO NOT EDIT.
+// Source: github.com/favonia/cloudflare-ddns/internal/provider (interfaces: Provider)
+
+// Package mocks is a generated GoMock package.
+package mocks
+
+import (
+	context "context"
+	netip "net/netip"
+	reflect "reflect"
+
+	ipnet "github.com/favonia/cloudflare-ddns/internal/ipnet"
+	pp "github.com/favonia/cloudflare-ddns/internal/pp"
+	gomock "github.com/golang/mock/gomock"
+)
+
+// MockProvider is a mock of Provider interface.
+type MockProvider struct {
+	ctrl     *gomock.Controller
+	recorder *MockProviderMockRecorder
+}
+
+// MockProviderMockRecorder is the mock recorder for MockProvider.
+type MockProviderMockRecorder struct {
+	mock *MockProvider
+}
+
+// NewMockProvider creates a new mock instance.
+func NewMockProvider(ctrl *gomock.Controller) *MockProvider {
+	mock := &MockProvider{ctrl: ctrl}
+	mock.recorder = &MockProviderMockRecorder{mock}
+	return mock
+}
+
+// EXPECT returns an object that allows the caller to indicate expected use.
+func (m *MockProvider) EXPECT() *MockProviderMockRecorder {
+	return m.recorder
+}
+
+// GetIP mocks base method.
+func (m *MockProvider) GetIP(arg0 context.Context, arg1 pp.PP, arg2 ipnet.Type) netip.Addr {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "GetIP", arg0, arg1, arg2)
+	ret0, _ := ret[0].(netip.Addr)
+	return ret0
+}
+
+// GetIP indicates an expected call of GetIP.
+func (mr *MockProviderMockRecorder) GetIP(arg0, arg1, arg2 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIP", reflect.TypeOf((*MockProvider)(nil).GetIP), arg0, arg1, arg2)
+}
+
+// Name mocks base method.
+func (m *MockProvider) Name() string {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "Name")
+	ret0, _ := ret[0].(string)
+	return ret0
+}
+
+// Name indicates an expected call of Name.
+func (mr *MockProviderMockRecorder) Name() *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockProvider)(nil).Name))
+}
diff --git a/internal/mocks/mock_setter.go b/internal/mocks/mock_setter.go
new file mode 100644
index 0000000..cdf5e53
--- /dev/null
+++ b/internal/mocks/mock_setter.go
@@ -0,0 +1,54 @@
+// Code generated by MockGen. DO NOT EDIT.
+// Source: github.com/favonia/cloudflare-ddns/internal/setter (interfaces: Setter)
+
+// Package mocks is a generated GoMock package.
+package mocks
+
+import (
+	context "context"
+	netip "net/netip"
+	reflect "reflect"
+
+	api "github.com/favonia/cloudflare-ddns/internal/api"
+	domain "github.com/favonia/cloudflare-ddns/internal/domain"
+	ipnet "github.com/favonia/cloudflare-ddns/internal/ipnet"
+	pp "github.com/favonia/cloudflare-ddns/internal/pp"
+	gomock "github.com/golang/mock/gomock"
+)
+
+// MockSetter is a mock of Setter interface.
+type MockSetter struct {
+	ctrl     *gomock.Controller
+	recorder *MockSetterMockRecorder
+}
+
+// MockSetterMockRecorder is the mock recorder for MockSetter.
+type MockSetterMockRecorder struct {
+	mock *MockSetter
+}
+
+// NewMockSetter creates a new mock instance.
+func NewMockSetter(ctrl *gomock.Controller) *MockSetter {
+	mock := &MockSetter{ctrl: ctrl}
+	mock.recorder = &MockSetterMockRecorder{mock}
+	return mock
+}
+
+// EXPECT returns an object that allows the caller to indicate expected use.
+func (m *MockSetter) EXPECT() *MockSetterMockRecorder {
+	return m.recorder
+}
+
+// Set mocks base method.
+func (m *MockSetter) Set(arg0 context.Context, arg1 pp.PP, arg2 domain.Domain, arg3 ipnet.Type, arg4 netip.Addr, arg5 api.TTL, arg6 bool) bool {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "Set", arg0, arg1, arg2, arg3, arg4, arg5, arg6)
+	ret0, _ := ret[0].(bool)
+	return ret0
+}
+
+// Set indicates an expected call of Set.
+func (mr *MockSetterMockRecorder) Set(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockSetter)(nil).Set), arg0, arg1, arg2, arg3, arg4, arg5, arg6)
+}


Test patch:
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index fc0609c..35e2e55 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -1,9 +1,11 @@
 name: Go
+
 on:
   push:
     branches: ["main"]
   pull_request:
-permissions: # added using https://github.com/step-security/secure-workflows
+
+permissions:
   contents: read
 
 jobs:
@@ -39,10 +41,33 @@ jobs:
         with:
           persist-credentials: false
       - run: |
-          go install github.com/golang/mock/mockgen@v1.6.0
-          go generate ./...
           go test -coverpkg=$(go list ./... | grep -v 'internal/mocks' | tr '\n' ',') -coverprofile=coverage.txt -race -v ./...
       - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
         with:
           file: ./coverage.txt
           flags: unittests
+  regenerate:
+    name: Regenerate
+    runs-on: ubuntu-latest
+    steps:
+      - name: Harden Runner
+        uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5
+        with:
+          disable-sudo: true
+          egress-policy: audit
+      - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
+        with:
+          go-version: 1.19
+      - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
+        with:
+          persist-credentials: false
+      - name: Install GoMock
+        run: go install github.com/golang/mock/mockgen@v1.6.0
+      - name: Run 'go generate'
+        run: go generate ./...
+      - name: git diff --quiet
+        run: |
+          if ! git diff --quiet; then
+            echo "Please run 'go gonerate ./...' to regenerate files"
+            exit 1
+          fi