@@ -20,12 +20,12 @@ package fetchers
20
20
import (
21
21
"context"
22
22
"fmt"
23
+ "maps"
23
24
"testing"
24
25
25
26
"github.com/samber/lo"
26
27
"github.com/stretchr/testify/mock"
27
28
"github.com/stretchr/testify/suite"
28
- "golang.org/x/exp/maps"
29
29
30
30
"github.com/elastic/cloudbeat/internal/resources/fetching"
31
31
"github.com/elastic/cloudbeat/internal/resources/fetching/cycle"
@@ -60,7 +60,7 @@ func (s *AzureBatchAssetFetcherTestSuite) TestFetcher_Fetch() {
60
60
var flatMockAssets []inventory.AzureAsset
61
61
for _ , assetGroup := range AzureBatchAssetGroups {
62
62
var mockAssets []inventory.AzureAsset
63
- for _ , assetType := range maps .Keys (AzureBatchAssets ) {
63
+ for assetType := range maps .Keys (AzureBatchAssets ) {
64
64
mockId := fmt .Sprintf ("%s-%s" , AzureBatchAssets [assetType ].SubType , "subId1" )
65
65
mockAssets = append (mockAssets ,
66
66
inventory.AzureAsset {
@@ -167,8 +167,8 @@ func (s *AzureBatchAssetFetcherTestSuite) TestFetcher_Fetch_Subscriptions() {
167
167
168
168
for _ , assetGroup := range AzureBatchAssetGroups {
169
169
var mockAssets []inventory.AzureAsset
170
- for _ , assetType := range maps .Keys (AzureBatchAssets ) {
171
- for _ , subKey := range maps .Keys (subMap ) {
170
+ for assetType := range maps .Keys (AzureBatchAssets ) {
171
+ for subKey := range maps .Keys (subMap ) {
172
172
mockId := fmt .Sprintf ("%s-%s" , AzureBatchAssets [assetType ].SubType , subKey )
173
173
mockAssets = append (mockAssets ,
174
174
inventory.AzureAsset {
@@ -213,7 +213,7 @@ func (s *AzureBatchAssetFetcherTestSuite) TestFetcher_Fetch_Subscriptions() {
213
213
})
214
214
s .Len (expectedSubs , len (subMap ))
215
215
216
- for _ , subKey := range maps .Keys (expectedSubs ) {
216
+ for subKey := range maps .Keys (expectedSubs ) {
217
217
typesPerSub := expectedSubs [subKey ]
218
218
s .Len (typesPerSub , len (AzureBatchAssets ))
219
219
for _ , subTypeRes := range typesPerSub {
0 commit comments