diff --git a/pkg/remote/google/google_compute_global_forwarding_rule_enumerator.go b/pkg/remote/google/google_compute_global_forwarding_rule_enumerator.go index 6c0ea63f..8e293a2d 100644 --- a/pkg/remote/google/google_compute_global_forwarding_rule_enumerator.go +++ b/pkg/remote/google/google_compute_global_forwarding_rule_enumerator.go @@ -24,14 +24,14 @@ func (e *GoogleComputeGlobalForwardingRuleEnumerator) SupportedType() resource.R } func (e *GoogleComputeGlobalForwardingRuleEnumerator) Enumerate() ([]*resource.Resource, error) { - nodeGroups, err := e.repository.SearchAllGlobalForwardingRules() //Change the name + globalForwardingRules, err := e.repository.SearchAllGlobalForwardingRules() if err != nil { return nil, remoteerror.NewResourceListingError(err, string(e.SupportedType())) } - results := make([]*resource.Resource, 0, len(nodeGroups)) + results := make([]*resource.Resource, 0, len(globalForwardingRules)) - for _, res := range nodeGroups { + for _, res := range globalForwardingRules { results = append( results, e.factory.CreateAbstractResource( diff --git a/pkg/remote/google/repository/mock_AssetRepository.go b/pkg/remote/google/repository/mock_AssetRepository.go index 207b5d11..44c46008 100644 --- a/pkg/remote/google/repository/mock_AssetRepository.go +++ b/pkg/remote/google/repository/mock_AssetRepository.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.9.4. DO NOT EDIT. +// Code generated by mockery v2.10.0. DO NOT EDIT. package repository @@ -288,6 +288,29 @@ func (_m *MockAssetRepository) SearchAllGlobalAddresses() ([]*asset.Asset, error return r0, r1 } +// SearchAllGlobalForwardingRules provides a mock function with given fields: +func (_m *MockAssetRepository) SearchAllGlobalForwardingRules() ([]*asset.Asset, error) { + ret := _m.Called() + + var r0 []*asset.Asset + if rf, ok := ret.Get(0).(func() []*asset.Asset); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*asset.Asset) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // SearchAllHealthChecks provides a mock function with given fields: func (_m *MockAssetRepository) SearchAllHealthChecks() ([]*asset.ResourceSearchResult, error) { ret := _m.Called() @@ -449,29 +472,6 @@ func (_m *MockAssetRepository) SearchAllNodeGroups() ([]*asset.Asset, error) { return r0, r1 } -// SearchAllGlobalForwardingRules provides a mock function with given fields: -func (_m *MockAssetRepository) SearchAllGlobalForwardingRules() ([]*asset.ResourceSearchResult, error) { - ret := _m.Called() - - var r0 []*asset.ResourceSearchResult - if rf, ok := ret.Get(0).(func() []*asset.ResourceSearchResult); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*asset.ResourceSearchResult) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // SearchAllRouters provides a mock function with given fields: func (_m *MockAssetRepository) SearchAllRouters() ([]*asset.ResourceSearchResult, error) { ret := _m.Called()