@@ -85,6 +85,10 @@ func (m *mockResultStore) GetSummary(ctx context.Context, scanID string) (*types
8585 return & types.Summary {}, m .err
8686}
8787
88+ func (m * mockResultStore ) SaveScanEvent (ctx context.Context , scanID string , eventType string , component string , message string , metadata map [string ]interface {}) error {
89+ return m .err
90+ }
91+
8892func (m * mockResultStore ) Close () error {
8993 return m .err
9094}
@@ -444,7 +448,7 @@ func TestConvertAuthInventoryToFindings_Empty(t *testing.T) {
444448
445449func TestConvertAuthInventoryToFindings_NetworkAuth (t * testing.T ) {
446450 inventory := & authdiscovery.AuthInventory {
447- NetworkAuth : & authdiscovery.NetworkAuth {
451+ NetworkAuth : & authdiscovery.NetworkAuthMethods {
448452 LDAP : []authdiscovery.LDAPEndpoint {
449453 {
450454 Host : "ldap.example.com" ,
@@ -467,8 +471,8 @@ func TestConvertAuthInventoryToFindings_NetworkAuth(t *testing.T) {
467471
468472func TestConvertAuthInventoryToFindings_WebAuth (t * testing.T ) {
469473 inventory := & authdiscovery.AuthInventory {
470- WebAuth : & authdiscovery.WebAuth {
471- FormLogin : []authdiscovery.FormLoginDetails {
474+ WebAuth : & authdiscovery.WebAuthMethods {
475+ FormLogin : []authdiscovery.FormLoginEndpoint {
472476 {
473477 URL : "https://example.com/login" ,
474478 Method : "POST" ,
@@ -491,8 +495,8 @@ func TestConvertAuthInventoryToFindings_WebAuth(t *testing.T) {
491495
492496func TestConvertAuthInventoryToFindings_APIAuth (t * testing.T ) {
493497 inventory := & authdiscovery.AuthInventory {
494- APIAuth : & authdiscovery.APIAuth {
495- REST : []authdiscovery.RESTAuthDetails {
498+ APIAuth : & authdiscovery.APIAuthMethods {
499+ REST : []authdiscovery.RESTEndpoint {
496500 {
497501 URL : "https://api.example.com/v1" ,
498502 },
@@ -533,18 +537,18 @@ func TestConvertAuthInventoryToFindings_CustomAuth(t *testing.T) {
533537
534538func TestConvertAuthInventoryToFindings_Multiple (t * testing.T ) {
535539 inventory := & authdiscovery.AuthInventory {
536- NetworkAuth : & authdiscovery.NetworkAuth {
540+ NetworkAuth : & authdiscovery.NetworkAuthMethods {
537541 LDAP : []authdiscovery.LDAPEndpoint {
538542 {Host : "ldap.example.com" , Port : 389 , SSL : false },
539543 },
540544 },
541- WebAuth : & authdiscovery.WebAuth {
542- FormLogin : []authdiscovery.FormLoginDetails {
545+ WebAuth : & authdiscovery.WebAuthMethods {
546+ FormLogin : []authdiscovery.FormLoginEndpoint {
543547 {URL : "https://example.com/login" , Method : "POST" },
544548 },
545549 },
546- APIAuth : & authdiscovery.APIAuth {
547- REST : []authdiscovery.RESTAuthDetails {
550+ APIAuth : & authdiscovery.APIAuthMethods {
551+ REST : []authdiscovery.RESTEndpoint {
548552 {URL : "https://api.example.com/v1" },
549553 },
550554 },
@@ -749,13 +753,13 @@ func BenchmarkRunComprehensiveBusinessLogicTests(b *testing.B) {
749753
750754func BenchmarkConvertAuthInventoryToFindings (b * testing.B ) {
751755 inventory := & authdiscovery.AuthInventory {
752- NetworkAuth : & authdiscovery.NetworkAuth {
756+ NetworkAuth : & authdiscovery.NetworkAuthMethods {
753757 LDAP : []authdiscovery.LDAPEndpoint {
754758 {Host : "ldap.example.com" , Port : 389 , SSL : false },
755759 },
756760 },
757- WebAuth : & authdiscovery.WebAuth {
758- FormLogin : []authdiscovery.FormLoginDetails {
761+ WebAuth : & authdiscovery.WebAuthMethods {
762+ FormLogin : []authdiscovery.FormLoginEndpoint {
759763 {URL : "https://example.com/login" , Method : "POST" },
760764 },
761765 },
0 commit comments