Skip to content

Commit

Permalink
SUB-4890 - support fetching global exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rinao12 committed Jul 8, 2024
1 parent 4dc1433 commit d1bec6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adapters/v1/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"github.com/kubescape/storage/pkg/apis/softwarecomposition/v1beta1"
"io"
"net/http"
"net/url"
"os"
"sync"
"testing"
"time"

"github.com/armosec/armoapi-go/armotypes"
v1 "github.com/armosec/armoapi-go/containerscan/v1"
"github.com/armosec/armoapi-go/identifiers"
"github.com/armosec/utils-go/httputils"
"github.com/armosec/utils-k8s-go/armometadata"
"github.com/google/uuid"
Expand All @@ -29,7 +29,7 @@ import (

func TestBackendAdapter_GetCVEExceptions(t *testing.T) {
type fields struct {
getCVEExceptionsFunc func(string, string, *identifiers.PortalDesignator, map[string]string) ([]armotypes.VulnerabilityExceptionPolicy, error)
getCVEExceptionsFunc func(string, string, *url.Values, map[string]string) ([]armotypes.VulnerabilityExceptionPolicy, error)
clusterConfig armometadata.ClusterConfig
}
tests := []struct {
Expand Down Expand Up @@ -184,7 +184,7 @@ func TestBackendAdapter_SubmitCVE(t *testing.T) {
}
a := &BackendAdapter{
clusterConfig: armometadata.ClusterConfig{},
getCVEExceptionsFunc: func(s, a string, designator *identifiers.PortalDesignator, headers map[string]string) ([]armotypes.VulnerabilityExceptionPolicy, error) {
getCVEExceptionsFunc: func(s, a string, designator *url.Values, headers map[string]string) ([]armotypes.VulnerabilityExceptionPolicy, error) {
return tt.exceptions, nil
},
httpPostFunc: httpPostFunc,
Expand Down

0 comments on commit d1bec6d

Please sign in to comment.