diff --git a/.github/workflows/build-ami-varsfile.yml b/.github/workflows/build-ami-varsfile.yml index ae343db960..2cef8f9994 100644 --- a/.github/workflows/build-ami-varsfile.yml +++ b/.github/workflows/build-ami-varsfile.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: repository: kubernetes-sigs/image-builder ref: ${{ inputs.image_builder_version }} diff --git a/.github/workflows/build-ami.yml b/.github/workflows/build-ami.yml index 833bc93686..485c464a50 100644 --- a/.github/workflows/build-ami.yml +++ b/.github/workflows/build-ami.yml @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: repository: kubernetes-sigs/image-builder ref: ${{ inputs.image_builder_version }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 40d10d7cca..77b7577a3e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,7 +21,7 @@ jobs: language: [ 'go' ] steps: - name: Checkout repository - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 223b093054..eb532e3554 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -28,7 +28,7 @@ jobs: go-version: '1.23' id: go - name: Check out code into the Go module directory - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v5 - uses: actions/cache@v4 name: Restore go cache with: diff --git a/.github/workflows/md-link-checker.yml b/.github/workflows/md-link-checker.yml index 3efb96c189..bdeae1e86a 100644 --- a/.github/workflows/md-link-checker.yml +++ b/.github/workflows/md-link-checker.yml @@ -8,7 +8,7 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.1 + - uses: actions/checkout@v5 - uses: artyom/mdlinks@v0 with: dir: 'docs/book' diff --git a/.github/workflows/pr-golangci-lint.yaml b/.github/workflows/pr-golangci-lint.yaml index be19cccadd..02ad04c526 100644 --- a/.github/workflows/pr-golangci-lint.yaml +++ b/.github/workflows/pr-golangci-lint.yaml @@ -17,7 +17,7 @@ jobs: working-directory: - "" steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 + - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # tag=v4.2.2 - name: Calculate go version id: vars run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index d99d404881..9aed57f8fb 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest name: verify PR contents steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 + - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # tag=v4.2.2 - name: Check if PR title is valid env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5f050d3691..547b88dc6b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Set up Go diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 6e18bb6404..e6dfc5c610 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v5 with: ref: ${{ matrix.branch }} - name: Setup go diff --git a/pkg/cloud/services/secretsmanager/mock_secretsmanageriface/secretsmanagerapi_mock.go b/pkg/cloud/services/secretsmanager/mock_secretsmanageriface/secretsmanagerapi_mock.go new file mode 100644 index 0000000000..d2e72e44cf --- /dev/null +++ b/pkg/cloud/services/secretsmanager/mock_secretsmanageriface/secretsmanagerapi_mock.go @@ -0,0 +1,92 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by MockGen. DO NOT EDIT. +// Source: sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/secretsmanager (interfaces: SecretsManagerAPI) + +// Package mock_secretsmanageriface is a generated GoMock package. +package mock_secretsmanageriface + +import ( + context "context" + reflect "reflect" + + secretsmanager "github.com/aws/aws-sdk-go-v2/service/secretsmanager" + gomock "github.com/golang/mock/gomock" +) + +// MockSecretsManagerAPI is a mock of SecretsManagerAPI interface. +type MockSecretsManagerAPI struct { + ctrl *gomock.Controller + recorder *MockSecretsManagerAPIMockRecorder +} + +// MockSecretsManagerAPIMockRecorder is the mock recorder for MockSecretsManagerAPI. +type MockSecretsManagerAPIMockRecorder struct { + mock *MockSecretsManagerAPI +} + +// NewMockSecretsManagerAPI creates a new mock instance. +func NewMockSecretsManagerAPI(ctrl *gomock.Controller) *MockSecretsManagerAPI { + mock := &MockSecretsManagerAPI{ctrl: ctrl} + mock.recorder = &MockSecretsManagerAPIMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSecretsManagerAPI) EXPECT() *MockSecretsManagerAPIMockRecorder { + return m.recorder +} + +// CreateSecret mocks base method. +func (m *MockSecretsManagerAPI) CreateSecret(arg0 context.Context, arg1 *secretsmanager.CreateSecretInput, arg2 ...func(*secretsmanager.Options)) (*secretsmanager.CreateSecretOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateSecret", varargs...) + ret0, _ := ret[0].(*secretsmanager.CreateSecretOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateSecret indicates an expected call of CreateSecret. +func (mr *MockSecretsManagerAPIMockRecorder) CreateSecret(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, "CreateSecret", reflect.TypeOf((*MockSecretsManagerAPI)(nil).CreateSecret), varargs...) +} + +// DeleteSecret mocks base method. +func (m *MockSecretsManagerAPI) DeleteSecret(arg0 context.Context, arg1 *secretsmanager.DeleteSecretInput, arg2 ...func(*secretsmanager.Options)) (*secretsmanager.DeleteSecretOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteSecret", varargs...) + ret0, _ := ret[0].(*secretsmanager.DeleteSecretOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteSecret indicates an expected call of DeleteSecret. +func (mr *MockSecretsManagerAPIMockRecorder) DeleteSecret(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, "DeleteSecret", reflect.TypeOf((*MockSecretsManagerAPI)(nil).DeleteSecret), varargs...) +}