fix: PR review comments
parent
e9f906e8fc
commit
d4515f8a0d
|
@ -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(
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue