-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump golangci-lint to v1.55.2 (#216)
* bump golangci-lint to v1.55.0 * enable additional linters * fix lint error * bump golangci-lint to v1.55.1 * increase timeout to 10m * bump golangci-lint to v1.55.2
- Loading branch information
1 parent
6d56728
commit af4523f
Showing
8 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,5 @@ jobs: | |
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1 # [email protected] | ||
with: | ||
version: v1.54.2 | ||
args: --verbose --timeout 5m | ||
version: v1.55.2 | ||
args: --verbose --timeout 10m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package utils_test | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
|
||
"github.com/gardener/terminal-controller-manager/internal/utils" | ||
) | ||
|
||
var _ = Describe("miscellaneous", func() { | ||
Describe("ToFnvHash", func() { | ||
Context("When a string is passed", func() { | ||
It("should return hash without error", func() { | ||
value := "test string" | ||
hash, err := utils.ToFnvHash(value) | ||
|
||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(hash).To(Equal("10983430520173899754")) | ||
}) | ||
}) | ||
|
||
Context("When an empty string is passed", func() { | ||
It("should return hash without error", func() { | ||
value := "" | ||
hash, err := utils.ToFnvHash(value) | ||
|
||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(hash).To(Equal("14695981039346656037")) | ||
}) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package utils_test | ||
|
||
import ( | ||
"testing" | ||
"time" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
func TestAPIs(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
|
||
SetDefaultEventuallyTimeout(5 * time.Second) | ||
RunSpecs(t, "Utils Suite") | ||
} |