Skip to content

Commit 2b3c776

Browse files
JslYoonLucas Yoon
andauthored
[Devfile #1701] support Go 1.24 && change failing tests due to stricter linting rules && updating gosec version (#1746)
Signed-off-by: Lucas Yoon <[email protected]> Co-authored-by: Lucas Yoon <[email protected]>
1 parent 22851c4 commit 2b3c776

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
- name: Run Gosec Security Scanner
9797
run: |
9898
export PATH=$PATH:$(go env GOPATH)/bin
99-
go install github.com/securego/gosec/v2/cmd/gosec@v2.20.0
99+
go install github.com/securego/gosec/v2/cmd/gosec@v2.22.7
100100
bash ./run_gosec.sh
101101
if [[ $? != 0 ]]
102102
then

generator/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/devfile/api/generator
22

3-
go 1.22
3+
go 1.24
44

55
require (
66
github.com/coreos/go-semver v0.3.1

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/devfile/api/v2
22

3-
go 1.22.0
3+
go 1.24
44

55
require (
66
github.com/ghodss/yaml v1.0.0

run_gosec.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
if ! command -v gosec 2> /dev/null
2121
then
22-
echo "error gosec must be installed with this command: go install github.com/securego/gosec/v2/cmd/gosec@v2.14.0" && exit 1
22+
echo "error gosec must be installed with this command: go install github.com/securego/gosec/v2/cmd/gosec@v2.22.7" && exit 1
2323
fi
2424

2525
gosec -no-fail -fmt=sarif -out=gosec.sarif -exclude-dir test -exclude-dir generator ./...

test/v200/utils/api/test_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func RunTest(testContent commonUtils.TestContent, t *testing.T) {
183183

184184
testDevfile, err := commonUtils.GetDevfile(testContent.FileName, nil, validator)
185185
if err != nil {
186-
t.Fatalf(commonUtils.LogMessage(fmt.Sprintf("Error creating devfile : %v", err)))
186+
t.Fatal(commonUtils.LogMessage(fmt.Sprintf("Error creating devfile : %v", err)))
187187
}
188188

189189
testDevfile.RunTest(testContent, t)

test/v200/utils/common/test_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ func (testDevfile *TestDevfile) RunTest(testContent TestContent, t *testing.T) {
368368

369369
err := testDevfile.Validator.WriteAndValidate(testDevfile)
370370
if err != nil {
371-
t.Fatalf(LogErrorMessage(fmt.Sprintf("ERROR verifying devfile : %s : %v", testContent.FileName, err)))
371+
t.Fatal(LogErrorMessage(fmt.Sprintf("ERROR verifying devfile : %s : %v", testContent.FileName, err)))
372372
}
373373

374374
}

0 commit comments

Comments
 (0)