mirror of
https://github.com/securego/gosec.git
synced 2024-11-05 19:45:51 +00:00
Fix go vet errors in tests
This commit is contained in:
parent
f7c31f2439
commit
485bc31df8
3 changed files with 4 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
|||
package gas_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
@ -20,10 +19,9 @@ var _ = Describe("Analyzer", func() {
|
|||
var (
|
||||
analyzer *gas.Analyzer
|
||||
logger *log.Logger
|
||||
output *bytes.Buffer
|
||||
)
|
||||
BeforeEach(func() {
|
||||
logger, output = testutils.NewLogger()
|
||||
logger, _ = testutils.NewLogger()
|
||||
analyzer = gas.NewAnalyzer(nil, logger)
|
||||
})
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package gas_test
|
|||
|
||||
import (
|
||||
. "github.com/onsi/ginkgo"
|
||||
//. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("ImportTracker", func() {
|
||||
|
@ -15,6 +15,7 @@ var _ = Describe("ImportTracker", func() {
|
|||
})
|
||||
Context("when I have a valid go package", func() {
|
||||
It("should record all import specs", func() {
|
||||
Expect(source).To(Equal(source))
|
||||
Skip("Not implemented")
|
||||
})
|
||||
|
||||
|
|
|
@ -17,14 +17,13 @@ var _ = Describe("gas rules", func() {
|
|||
|
||||
var (
|
||||
logger *log.Logger
|
||||
output *bytes.Buffer
|
||||
config gas.Config
|
||||
analyzer *gas.Analyzer
|
||||
runner func(string, []testutils.CodeSample)
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
logger, output = testutils.NewLogger()
|
||||
logger, _ = testutils.NewLogger()
|
||||
config = gas.NewConfig()
|
||||
analyzer = gas.NewAnalyzer(config, logger)
|
||||
runner = func(rule string, samples []testutils.CodeSample) {
|
||||
|
|
Loading…
Reference in a new issue