1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-29 22:37:59 +02:00

Enable golangcli and improve testing for formatters

This commit is contained in:
Matthieu MOREL
2021-05-10 10:08:04 +02:00
committed by GitHub
parent 4df7f1c3e9
commit 103c429df5
18 changed files with 755 additions and 336 deletions

22
cwe/data_test.go Normal file
View File

@@ -0,0 +1,22 @@
package cwe_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/securego/gosec/v2/cwe"
)
var _ = Describe("CWE data", func() {
BeforeEach(func() {
})
Context("when consulting cwe data", func() {
It("it should retrieves the weakness", func() {
weakness := cwe.Get("798")
Expect(weakness).ShouldNot(BeNil())
Expect(weakness.ID).ShouldNot(BeNil())
Expect(weakness.Name).ShouldNot(BeNil())
Expect(weakness.Description).ShouldNot(BeNil())
})
})
})