diff --git a/providers/aws/connection/awsec2ebsconn/provider.go b/providers/aws/connection/awsec2ebsconn/provider.go index fe3f1e9877..795b0d4364 100644 --- a/providers/aws/connection/awsec2ebsconn/provider.go +++ b/providers/aws/connection/awsec2ebsconn/provider.go @@ -377,6 +377,10 @@ func (c *AwsEbsConnection) Asset() *inventory.Asset { return c.asset } +func (p *AwsEbsConnection) UpdateAsset(asset *inventory.Asset) { + p.asset = asset +} + func (c *AwsEbsConnection) Capabilities() shared.Capabilities { return shared.Capability_RunCommand // not true, update to nothing } diff --git a/providers/aws/connection/connection.go b/providers/aws/connection/connection.go index ecdf1a78ad..74bc3eb31b 100644 --- a/providers/aws/connection/connection.go +++ b/providers/aws/connection/connection.go @@ -233,6 +233,10 @@ func (p *AwsConnection) Asset() *inventory.Asset { return p.asset } +func (p *AwsConnection) UpdateAsset(asset *inventory.Asset) { + p.asset = asset +} + func (p *AwsConnection) AccountId() string { return p.accountId } diff --git a/providers/azure/connection/azureinstancesnapshot/provider_test.go b/providers/azure/connection/azureinstancesnapshot/provider_test.go index a3db6bb635..79188d754b 100644 --- a/providers/azure/connection/azureinstancesnapshot/provider_test.go +++ b/providers/azure/connection/azureinstancesnapshot/provider_test.go @@ -13,7 +13,7 @@ import ( func TestParseTarget(t *testing.T) { t.Run("parse snapshot target with just a resource name", func(t *testing.T) { scanner := &azureScannerInstance{ - instanceInfo: instanceInfo{ + instanceInfo: &instanceInfo{ resourceGroup: "my-rg", instanceName: "my-instance", }, @@ -34,7 +34,7 @@ func TestParseTarget(t *testing.T) { }) t.Run("parse instance target with just a resource name", func(t *testing.T) { scanner := &azureScannerInstance{ - instanceInfo: instanceInfo{ + instanceInfo: &instanceInfo{ resourceGroup: "my-rg", instanceName: "my-instance", }, @@ -55,7 +55,7 @@ func TestParseTarget(t *testing.T) { }) t.Run("parse disk target with just a resource name", func(t *testing.T) { scanner := &azureScannerInstance{ - instanceInfo: instanceInfo{ + instanceInfo: &instanceInfo{ resourceGroup: "my-rg", instanceName: "my-instance", }, @@ -76,7 +76,7 @@ func TestParseTarget(t *testing.T) { }) t.Run("parse snapshot target with a fully qualified Azure resource ID", func(t *testing.T) { scanner := &azureScannerInstance{ - instanceInfo: instanceInfo{ + instanceInfo: &instanceInfo{ resourceGroup: "my-rg", instanceName: "my-instance", }, @@ -97,7 +97,7 @@ func TestParseTarget(t *testing.T) { }) t.Run("parse instance target with a fully qualified Azure resource ID", func(t *testing.T) { scanner := &azureScannerInstance{ - instanceInfo: instanceInfo{ + instanceInfo: &instanceInfo{ resourceGroup: "my-rg", instanceName: "my-instance", }, @@ -118,7 +118,7 @@ func TestParseTarget(t *testing.T) { }) t.Run("parse disk target with a fully qualified Azure resource ID", func(t *testing.T) { scanner := &azureScannerInstance{ - instanceInfo: instanceInfo{ + instanceInfo: &instanceInfo{ resourceGroup: "my-rg", instanceName: "my-instance", },