mirror of
https://github.com/securego/gosec.git
synced 2025-07-17 01:12:33 +02:00
Add some more tests to make codecov happy
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
@ -416,6 +416,22 @@ var _ = Describe("Analyzer", func() {
|
||||
Expect(ferr[1].Err).Should(MatchRegexp(`error2`))
|
||||
}
|
||||
})
|
||||
|
||||
It("should set the config", func() {
|
||||
config := gosec.NewConfig()
|
||||
config["test"] = "test"
|
||||
analyzer.SetConfig(config)
|
||||
found := analyzer.Config()
|
||||
Expect(config).To(Equal(found))
|
||||
})
|
||||
|
||||
It("should reset the analyzer", func() {
|
||||
analyzer.Reset()
|
||||
issues, metrics, errors := analyzer.Report()
|
||||
Expect(issues).To(BeEmpty())
|
||||
Expect(*metrics).To(Equal(gosec.Metrics{}))
|
||||
Expect(errors).To(BeEmpty())
|
||||
})
|
||||
})
|
||||
|
||||
Context("when appending errors", func() {
|
||||
|
Reference in New Issue
Block a user