chore: fix mess with azurerm2 imports

main
Elie CHARRA 2022-07-06 16:42:49 +02:00
parent 81f2efb96b
commit 83be84efb4
No known key found for this signature in database
GPG Key ID: 399AF69092C727B6
5 changed files with 28 additions and 28 deletions

View File

@ -4,7 +4,7 @@ import (
"testing"
"github.com/snyk/driftctl/enumeration"
azurerm2 "github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm/repository"
"github.com/snyk/driftctl/enumeration/remote/cache"
"github.com/snyk/driftctl/enumeration/remote/common"
@ -105,7 +105,7 @@ func TestAzurermCompute_Image(t *testing.T) {
fakeRepo := &repository.MockComputeRepository{}
c.mocks(fakeRepo, alerter)
remoteLibrary.AddEnumerator(azurerm2.NewAzurermImageEnumerator(fakeRepo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermImageEnumerator(fakeRepo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -214,7 +214,7 @@ func TestAzurermCompute_SSHPublicKey(t *testing.T) {
repo = repository.NewComputeRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermSSHPublicKeyEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermSSHPublicKeyEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzureSSHPublicKeyResourceType, common.NewGenericDetailsFetcher(resourceazure.AzureSSHPublicKeyResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}

View File

@ -4,7 +4,7 @@ import (
"testing"
"github.com/snyk/driftctl/enumeration"
azurerm2 "github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm/repository"
"github.com/snyk/driftctl/enumeration/remote/cache"
"github.com/snyk/driftctl/enumeration/remote/common"
@ -102,7 +102,7 @@ func TestAzurermVirtualNetwork(t *testing.T) {
var repo repository.NetworkRepository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermVirtualNetworkEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermVirtualNetworkEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -195,7 +195,7 @@ func TestAzurermRouteTables(t *testing.T) {
var repo repository.NetworkRepository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermRouteTableEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermRouteTableEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -344,7 +344,7 @@ func TestAzurermRoutes(t *testing.T) {
var repo repository.NetworkRepository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermRouteEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermRouteEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -477,7 +477,7 @@ func TestAzurermSubnets(t *testing.T) {
var repo repository.NetworkRepository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermSubnetEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermSubnetEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -570,7 +570,7 @@ func TestAzurermFirewalls(t *testing.T) {
var repo repository.NetworkRepository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermFirewallsEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermFirewallsEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -663,7 +663,7 @@ func TestAzurermPublicIP(t *testing.T) {
var repo repository.NetworkRepository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPublicIPEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPublicIPEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -772,7 +772,7 @@ func TestAzurermSecurityGroups(t *testing.T) {
repo = repository.NewNetworkRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermNetworkSecurityGroupEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermNetworkSecurityGroupEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzureNetworkSecurityGroupResourceType, common.NewGenericDetailsFetcher(resourceazure.AzureNetworkSecurityGroupResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}
@ -866,7 +866,7 @@ func TestAzurermLoadBalancers(t *testing.T) {
var repo repository.NetworkRepository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermLoadBalancerEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermLoadBalancerEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -993,7 +993,7 @@ func TestAzurermLoadBalancerRules(t *testing.T) {
repo = repository.NewNetworkRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermLoadBalancerRuleEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermLoadBalancerRuleEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzureLoadBalancerRuleResourceType, common.NewGenericDetailsFetcher(resourceazure.AzureLoadBalancerRuleResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}

View File

@ -4,7 +4,7 @@ import (
"testing"
"github.com/snyk/driftctl/enumeration"
azurerm2 "github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm/repository"
"github.com/snyk/driftctl/enumeration/remote/common"
remoteerr "github.com/snyk/driftctl/enumeration/remote/error"
@ -100,7 +100,7 @@ func TestAzurermPostgresqlServer(t *testing.T) {
var repo repository.PostgresqlRespository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPostgresqlServerEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPostgresqlServerEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -226,7 +226,7 @@ func TestAzurermPostgresqlDatabase(t *testing.T) {
var repo repository.PostgresqlRespository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPostgresqlDatabaseEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPostgresqlDatabaseEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)

View File

@ -4,7 +4,7 @@ import (
"testing"
"github.com/snyk/driftctl/enumeration"
azurerm2 "github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm/repository"
"github.com/snyk/driftctl/enumeration/remote/cache"
"github.com/snyk/driftctl/enumeration/remote/common"
@ -130,7 +130,7 @@ func TestAzurermPrivateDNSZone(t *testing.T) {
repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPrivateDNSZoneEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSZoneEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzurePrivateDNSZoneResourceType, common.NewGenericDetailsFetcher(resourceazure.AzurePrivateDNSZoneResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}
@ -284,7 +284,7 @@ func TestAzurermPrivateDNSARecord(t *testing.T) {
repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPrivateDNSARecordEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSARecordEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzurePrivateDNSARecordResourceType, common.NewGenericDetailsFetcher(resourceazure.AzurePrivateDNSARecordResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}
@ -439,7 +439,7 @@ func TestAzurermPrivateDNSAAAARecord(t *testing.T) {
repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPrivateDNSAAAARecordEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSAAAARecordEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzurePrivateDNSAAAARecordResourceType, common.NewGenericDetailsFetcher(resourceazure.AzurePrivateDNSAAAARecordResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}
@ -582,7 +582,7 @@ func TestAzurermPrivateDNSCNAMERecord(t *testing.T) {
repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPrivateDNSCNameRecordEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSCNameRecordEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzurePrivateDNSCNameRecordResourceType, common.NewGenericDetailsFetcher(resourceazure.AzurePrivateDNSCNameRecordResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}
@ -736,7 +736,7 @@ func TestAzurermPrivateDNSPTRRecord(t *testing.T) {
repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPrivateDNSPTRRecordEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSPTRRecordEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzurePrivateDNSPTRRecordResourceType, common.NewGenericDetailsFetcher(resourceazure.AzurePrivateDNSPTRRecordResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}
@ -891,7 +891,7 @@ func TestAzurermPrivateDNSMXRecord(t *testing.T) {
repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPrivateDNSMXRecordEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSMXRecordEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzurePrivateDNSMXRecordResourceType, common.NewGenericDetailsFetcher(resourceazure.AzurePrivateDNSMXRecordResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}
@ -1045,7 +1045,7 @@ func TestAzurermPrivateDNSSRVRecord(t *testing.T) {
repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPrivateDNSSRVRecordEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSSRVRecordEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzurePrivateDNSSRVRecordResourceType, common.NewGenericDetailsFetcher(resourceazure.AzurePrivateDNSSRVRecordResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}
@ -1199,7 +1199,7 @@ func TestAzurermPrivateDNSTXTRecord(t *testing.T) {
repo = repository.NewPrivateDNSRepository(cred, clientOptions, realProvider.GetConfig(), cache.New(0))
}
remoteLibrary.AddEnumerator(azurerm2.NewAzurermPrivateDNSTXTRecordEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermPrivateDNSTXTRecordEnumerator(repo, factory))
remoteLibrary.AddDetailsFetcher(resourceazure.AzurePrivateDNSTXTRecordResourceType, common.NewGenericDetailsFetcher(resourceazure.AzurePrivateDNSTXTRecordResourceType, provider, deserializer))
testFilter := &enumeration.MockFilter{}

View File

@ -4,7 +4,7 @@ import (
"testing"
"github.com/snyk/driftctl/enumeration"
azurerm2 "github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm"
"github.com/snyk/driftctl/enumeration/remote/azurerm/repository"
"github.com/snyk/driftctl/enumeration/remote/common"
error2 "github.com/snyk/driftctl/enumeration/remote/error"
@ -97,7 +97,7 @@ func TestAzurermStorageAccount(t *testing.T) {
var repo repository.StorageRespository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermStorageAccountEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermStorageAccountEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)
@ -242,7 +242,7 @@ func TestAzurermStorageContainer(t *testing.T) {
var repo repository.StorageRespository = fakeRepo
remoteLibrary.AddEnumerator(azurerm2.NewAzurermStorageContainerEnumerator(repo, factory))
remoteLibrary.AddEnumerator(azurerm.NewAzurermStorageContainerEnumerator(repo, factory))
testFilter := &enumeration.MockFilter{}
testFilter.On("IsTypeIgnored", mock.Anything).Return(false)