diff --git a/providers/network/resources/dns_test.go b/providers/network/resources/dns_test.go index 94cc31c654..35a4bb4264 100644 --- a/providers/network/resources/dns_test.go +++ b/providers/network/resources/dns_test.go @@ -13,6 +13,7 @@ import ( "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" "go.mondoo.com/cnquery/v10/providers/network/connection" "go.mondoo.com/cnquery/v10/providers/network/resources" + "go.mondoo.com/cnquery/v10/utils/syncx" ) func TestResource_DNS(t *testing.T) { @@ -50,13 +51,13 @@ func TestResource_DnsFqdn(t *testing.T) { }, } - runtime := &plugin.Runtime{} + runtime := &plugin.Runtime{Resources: &syncx.Map[plugin.Resource]{}} for _, tc := range testCases { conf := &inventory.Config{ Host: tc.hostName, } - runtime.Connection = connection.NewHostConnection(1, nil, conf) + runtime.Connection = connection.NewHostConnection(1, &inventory.Asset{}, conf) dns, err := resources.NewResource( runtime, diff --git a/providers/network/resources/tls_test.go b/providers/network/resources/tls_test.go index 6fe6380e3b..f6b6b922c3 100644 --- a/providers/network/resources/tls_test.go +++ b/providers/network/resources/tls_test.go @@ -13,6 +13,7 @@ import ( "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" "go.mondoo.com/cnquery/v10/providers/network/connection" "go.mondoo.com/cnquery/v10/providers/network/resources" + "go.mondoo.com/cnquery/v10/utils/syncx" ) func TestResource_TLS(t *testing.T) { @@ -32,13 +33,13 @@ func TestResource_TlsFqdn(t *testing.T) { }, } - runtime := &plugin.Runtime{} + runtime := &plugin.Runtime{Resources: &syncx.Map[plugin.Resource]{}} for _, tc := range testCases { conf := &inventory.Config{ Host: tc.hostName, } - runtime.Connection = connection.NewHostConnection(1, nil, conf) + runtime.Connection = connection.NewHostConnection(1, &inventory.Asset{}, conf) dns, err := resources.NewResource( runtime,