diff options
| author | Paul Duncan <pabs@pablotron.org> | 2022-02-22 19:57:10 -0500 | 
|---|---|---|
| committer | Paul Duncan <pabs@pablotron.org> | 2022-02-22 19:57:10 -0500 | 
| commit | 6927f43711ea8e4558ff4c138291712179c21acb (patch) | |
| tree | 78788aa7f931cf1ebf439fea85a4b8eb10795015 | |
| parent | 5b78051b3a023e78634e8985807a7beddaa0aaa9 (diff) | |
| download | cvez-6927f43711ea8e4558ff4c138291712179c21acb.tar.xz cvez-6927f43711ea8e4558ff4c138291712179c21acb.zip | |
dbstore: update tests to exclude excrutiating ones in short test mode
| -rw-r--r-- | dbstore/dbstore_test.go | 20 | 
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", | 
