feat(report): display EOL information to scan summary (#1120)
* feat(report): display EOL information to scan summary * detect Amazon linux EOL
This commit is contained in:
@@ -154,3 +154,29 @@ func TestTruncate(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func Test_major(t *testing.T) {
|
||||
var tests = []struct {
|
||||
in string
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
in: "",
|
||||
expected: "",
|
||||
},
|
||||
{
|
||||
in: "4.1",
|
||||
expected: "4",
|
||||
},
|
||||
{
|
||||
in: "0:4.1",
|
||||
expected: "4",
|
||||
},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
a := Major(tt.in)
|
||||
if tt.expected != a {
|
||||
t.Errorf("[%d]\nexpected: %s\n actual: %s\n", i, tt.expected, a)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user