mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-01-31 05:43:14 +08:00
test: fix assertion after 2026 roll over (#10002)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package ignore_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
@@ -157,7 +159,7 @@ func TestRules_Ignore(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "ignore rule with expiry date not passed",
|
||||
src: `#trivy:ignore:rule-1:exp:2026-01-01`,
|
||||
src: fmt.Sprintf(`#trivy:ignore:rule-1:exp:%d-01-01`, time.Now().Year()+1),
|
||||
args: args{
|
||||
metadata: metadataWithLine(filename, 2),
|
||||
ids: []string{"rule-1"},
|
||||
|
||||
Reference in New Issue
Block a user