Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
go-version-file: tests/go.mod

- name: Analysis
uses: golangci/golangci-lint-action@d6238b002a20823d52840fda27e2d4891c5952dc # v4
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
args: -v
working-directory: tests
Expand Down
80 changes: 56 additions & 24 deletions tests/.golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,62 @@
version: "2"
run:
timeout: 5m
tests: false
output:
format: github-actions
formats:
text:
path: stdout
colors: true
linters:
default: none
enable:
- revive # replacement for golint
- dupl # check duplicated code
- goconst # check strings that can turn into constants
- gofmt # check fmt
- goheader # Check license headers, only checks files in current year
- goimports # check imports
- gocyclo # check complexity
linters-settings:
gocyclo:
min-complexity: 30
goheader:
template: |-
Copyright © 2022 - {{year}} SUSE LLC
- dupl # check duplicated code
- errcheck
- errorlint
- goconst # check strings that can turn into constants
- gocritic # provides diagnostics that check for bugs, performance and style issues
- gocyclo # check complexity
- goheader # check license headers, only checks files in current year
- gosec # inspects source code for security problems
- govet # run govet
- ineffassign # check ineffectual assignments
- revive # replacement for golint
- staticcheck # staticcheck
- unparam # reports unused function parameters
- unused # unused constants, variables, functions and types
settings:
gocyclo:
min-complexity: 20 # default is 30 which is too high
goheader:
template: |-
Copyright © {{year-range}} SUSE LLC

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.
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.
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports # check imports
- gofmt # check fmt
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
1 change: 1 addition & 0 deletions tests/e2e/helpers/misc/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func RandomSleep(sequential bool, index int) {
}

// Initialize the seed
// nolint:gosec
r := rand.New(rand.NewSource(time.Now().UnixNano()))

// Get a pseudo-random value
Expand Down
38 changes: 24 additions & 14 deletions tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,39 +1,49 @@
module github.com/rancher/elemental/tests

go 1.24.9
go 1.25.0

replace go.qase.io/client => github.com/rancher/qase-go/client v0.0.0-20231114201952-65195ec001fa

require (
github.com/onsi/ginkgo/v2 v2.27.5
github.com/onsi/gomega v1.39.0
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20260121133442-5e31628d3dc7
github.com/rancher-sandbox/qase-ginkgo v1.0.1
github.com/onsi/ginkgo/v2 v2.28.1
github.com/onsi/gomega v1.39.1
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20260420133103-13d8ca0d7e00
github.com/rancher-sandbox/qase-ginkgo v1.0.2
github.com/sirupsen/logrus v1.9.4
golang.org/x/mod v0.32.0
golang.org/x/mod v0.35.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/antihax/optional v1.0.0 // indirect
github.com/bramvdbogaerde/go-scp v1.6.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/gkampitakis/ciinfo v0.3.4 // indirect
github.com/gkampitakis/go-snaps v0.5.21 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/goccy/go-yaml v1.19.2 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 // indirect
github.com/maruel/natural v1.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/tidwall/match v1.2.0 // indirect
go.qase.io/client v0.0.0-20231114201952-65195ec001fa // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.1 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.47.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/tools v0.41.0 // indirect
golang.org/x/crypto v0.50.0 // indirect
golang.org/x/net v0.53.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.43.0 // indirect
golang.org/x/text v0.36.0 // indirect
golang.org/x/tools v0.44.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
libvirt.org/libvirt-go-xml v7.4.0+incompatible // indirect
)
Loading
Loading