aboutsummaryrefslogtreecommitdiff
path: root/dbstore
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-02-22 19:57:10 -0500
committerPaul Duncan <pabs@pablotron.org>2022-02-22 19:57:10 -0500
commit6927f43711ea8e4558ff4c138291712179c21acb (patch)
tree78788aa7f931cf1ebf439fea85a4b8eb10795015 /dbstore
parent5b78051b3a023e78634e8985807a7beddaa0aaa9 (diff)
downloadcvez-6927f43711ea8e4558ff4c138291712179c21acb.tar.bz2
cvez-6927f43711ea8e4558ff4c138291712179c21acb.zip
dbstore: update tests to exclude excrutiating ones in short test mode
Diffstat (limited to 'dbstore')
-rw-r--r--dbstore/dbstore_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/dbstore/dbstore_test.go b/dbstore/dbstore_test.go
index 69327d9..6394035 100644
--- a/dbstore/dbstore_test.go
+++ b/dbstore/dbstore_test.go
@@ -306,6 +306,11 @@ func TestGetQueries(t *testing.T) {
}
func TestAddCpeDictionaryPass(t *testing.T) {
+ if testing.Short() {
+ t.Skip("skipping TestAddCveFeeds() in short mode")
+ return
+ }
+
path := "./testdata/test-addcpedict.db"
ctx := context.Background()
@@ -331,6 +336,11 @@ func TestAddCpeDictionaryPass(t *testing.T) {
}
func TestAddCpeDictionaryFail(t *testing.T) {
+ if testing.Short() {
+ t.Skip("skipping TestAddCveFeeds() in short mode")
+ return
+ }
+
// load test CPEs
dict, err := getTestDictionary("testdata/test-0.xml.gz")
if err != nil {
@@ -553,6 +563,11 @@ func TestCpeSearch(t *testing.T) {
}
func TestAddCpeMatches(t *testing.T) {
+ if testing.Short() {
+ t.Skip("skipping TestAddCveFeeds() in short mode")
+ return
+ }
+
// cache context, create temp dir
ctx := context.Background()
dir, err := os.MkdirTemp("", "")
@@ -973,6 +988,11 @@ func TestCpeMatchSearch(t *testing.T) {
func TestAddCveFeeds(t *testing.T) {
ctx := context.Background()
+ if testing.Short() {
+ t.Skip("skipping TestAddCveFeeds() in short mode")
+ return
+ }
+
tests := []string {
"nvdcve-1.1-2002",
"nvdcve-1.1-2003",