aboutsummaryrefslogtreecommitdiff
path: root/internal/cvss/v31vector_test.go
blob: 8340123558f857abbf98f96f3ee36ac0e54c3857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package cvss

import "testing"

// test cvss v3.1 vector
var testCvssV3 = "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H"

// Test CVSS v3 parser.
func TestCvssV3Parser(t *testing.T) {
  t.Run("TestV3", func(t *testing.T) {
    // parse vector, check for error
    if _, err := NewVector(testCvssV3); err != nil {
      t.Fatal(err)
    }
  })

  // fmt.Println(v.Metrics())
  // fmt.Println(v)
}