@@ -779,7 +779,7 @@ func TestGetUsedLicensesPerDatabases_Success(t *testing.T) {
779779
780780 sqlServerContracts := []model.SqlServerDatabaseContract {}
781781
782- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
782+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
783783 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
784784 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
785785 gomock .InOrder (
@@ -909,7 +909,7 @@ func TestGetUsedLicensesPerDatabases_VMWareCluster_Success(t *testing.T) {
909909
910910 sqlServerContracts := []model.SqlServerDatabaseContract {}
911911
912- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
912+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
913913 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
914914 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
915915 gomock .InOrder (
@@ -1012,7 +1012,7 @@ func TestGetUsedLicensesPerDatabases_VeritasCluster_Success(t *testing.T) {
10121012
10131013 sqlServerContracts := []model.SqlServerDatabaseContract {}
10141014
1015- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
1015+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
10161016 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
10171017 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
10181018 gomock .InOrder (
@@ -1187,7 +1187,7 @@ func TestGetUsedLicensesPerDatabasesAsXLSX_Success(t *testing.T) {
11871187
11881188 sqlServerContracts := []model.SqlServerDatabaseContract {}
11891189
1190- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
1190+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
11911191 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
11921192 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
11931193 gomock .InOrder (
@@ -1349,7 +1349,7 @@ func TestGetOracleDatabasesUsedLicenses_Host_WithActiveDataguardAndGoldenGate_Su
13491349 History : []model.History {},
13501350 }
13511351
1352- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
1352+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
13531353 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
13541354 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
13551355 gomock .InOrder (
@@ -1525,7 +1525,7 @@ func TestGetOracleDatabasesUsedLicenses_VeritasCluster_WithActiveDataguardAndGol
15251525 },
15261526 }
15271527
1528- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
1528+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
15291529 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
15301530 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
15311531 gomock .InOrder (
@@ -1672,7 +1672,7 @@ func TestGetOracleDatabasesUsedLicenses_Host_WithRacAndRacOneNode_Success(t *tes
16721672 History : []model.History {},
16731673 }
16741674
1675- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
1675+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
16761676 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
16771677 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
16781678 gomock .InOrder (
@@ -1813,7 +1813,7 @@ func TestGetOracleDatabasesUsedLicenses_VeritasCluster_WithRacAndRacOneNode_Succ
18131813 History : []model.History {},
18141814 }
18151815
1816- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
1816+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
18171817 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
18181818 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
18191819 gomock .InOrder (
@@ -2006,7 +2006,7 @@ func TestGetOracleDatabasesUsedLicenses_VmwareCluster_WithRacAndRacOneNode_Succe
20062006 History : []model.History {},
20072007 }
20082008
2009- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
2009+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
20102010 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
20112011 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
20122012 gomock .InOrder (
@@ -2204,7 +2204,7 @@ func TestGetDatabaseLicensesComplianceAsXLSX_Success(t *testing.T) {
22042204 }}, nil ).AnyTimes ()
22052205 db .EXPECT ().GetClusters (globalFilterAny ).
22062206 Return (clusters , nil ).AnyTimes ()
2207- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
2207+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
22082208 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
22092209 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
22102210 gomock .InOrder (
@@ -2431,7 +2431,7 @@ func TestGetDatabaseLicensesCompliance_Success(t *testing.T) {
24312431 }}, nil ).AnyTimes ()
24322432 db .EXPECT ().GetClusters (globalFilterAny ).
24332433 Return (clusters , nil ).AnyTimes ()
2434- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
2434+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
24352435 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
24362436 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
24372437 gomock .InOrder (
@@ -2673,7 +2673,7 @@ func TestGetUsedLicensesPerHost_Success(t *testing.T) {
26732673 Return (hostdatas , nil ).AnyTimes ()
26742674 db .EXPECT ().GetClusters (globalFilterAny ).
26752675 Return (clusters , nil ).AnyTimes ()
2676- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
2676+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
26772677 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
26782678 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
26792679 gomock .InOrder (
@@ -2864,7 +2864,7 @@ func TestGetUsedLicensesPerHostAsXLSX_Success(t *testing.T) {
28642864 Return (hostdatas , nil ).AnyTimes ()
28652865 db .EXPECT ().GetClusters (globalFilterAny ).
28662866 Return (clusters , nil ).AnyTimes ()
2867- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
2867+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
28682868 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
28692869 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
28702870 gomock .InOrder (
@@ -2950,7 +2950,7 @@ func TestGetUsedLicensesPerCluster_OneVm_Success(t *testing.T) {
29502950 Return (hostdatasVm1 , nil ).AnyTimes ()
29512951 db .EXPECT ().GetClusters (globalFilterAny ).
29522952 Return (clusters , nil ).AnyTimes ()
2953- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
2953+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
29542954 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
29552955 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
29562956 gomock .InOrder (
@@ -3081,7 +3081,7 @@ func TestGetUsedLicensesPerCluster_MultipleVms_Success(t *testing.T) {
30813081 Return (hostdatasVm1 , nil ).AnyTimes ()
30823082 db .EXPECT ().GetClusters (globalFilterAny ).
30833083 Return (clusters , nil ).AnyTimes ()
3084- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
3084+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
30853085 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
30863086 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
30873087 gomock .InOrder (
@@ -3167,7 +3167,7 @@ func TestGetUsedLicensesPerClusterAsXLSX_Success(t *testing.T) {
31673167 Return (hostdatasVm1 , nil ).AnyTimes ()
31683168 db .EXPECT ().GetClusters (globalFilterAny ).
31693169 Return (clusters , nil ).AnyTimes ()
3170- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
3170+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
31713171 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
31723172 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
31733173 gomock .InOrder (
@@ -3245,7 +3245,7 @@ func TestGetDatabaseLicensesComplianceSqlServerHostWithContractContract_Success(
32453245 }}, nil ).AnyTimes ()
32463246 db .EXPECT ().GetClusters (globalFilterAny ).
32473247 Return (clusters , nil ).AnyTimes ()
3248- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
3248+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string {} , nil ).AnyTimes ()
32493249 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
32503250 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
32513251 gomock .InOrder (
@@ -3516,7 +3516,7 @@ func TestGetDatabaseLicensesComplianceSqlServerHostInClusterWithContract_Success
35163516 }}, nil ).AnyTimes ()
35173517 db .EXPECT ().GetClusters (globalFilterAny ).
35183518 Return (clusters , nil ).AnyTimes ()
3519- db .EXPECT ().ExistHostdata (gomock .Any ()).Return (true , nil ).AnyTimes ()
3519+ db .EXPECT ().ExistHostdataBatch (gomock .Any ()).Return ([] string { "plutocluster" } , nil ).AnyTimes ()
35203520 db .EXPECT ().FindClusterVeritasLicenses (gomock .Any ()).
35213521 Return ([]dto.ClusterVeritasLicense {}, nil ).AnyTimes ()
35223522 gomock .InOrder (
@@ -3559,7 +3559,7 @@ func TestGetDatabaseLicensesComplianceSqlServerHostInClusterWithContract_Success
35593559 Return (& cluster , nil ),
35603560 )
35613561
3562- db .EXPECT ().ExistHostdata ("plutocluster " ).Return (true , nil ).AnyTimes ()
3562+ db .EXPECT ().ExistHostdata ("plutohost " ).Return (true , nil ).AnyTimes ()
35633563
35643564 actual , err := as .GetDatabaseLicensesCompliance ([]string {})
35653565 require .NoError (t , err )
0 commit comments