Skip to content

Commit b80bd56

Browse files
committed
fix: tests and other minor fixes
1 parent d361f55 commit b80bd56

File tree

4 files changed

+6
-17
lines changed

4 files changed

+6
-17
lines changed

tests/Integration/Monitoring/Test_MonitoringSystem.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,7 @@ def test_listUniqueKeyValues(putAndDelete):
7373
assert "User" in result["Value"]
7474
assert "JobGroup" in result["Value"]
7575
assert "UserGroup" in result["Value"]
76-
assert result["Value"] == {
77-
"Status": [],
78-
"JobSplitType": [],
79-
"MinorStatus": [],
80-
"Site": [],
81-
"ApplicationStatus": [],
82-
"User": [],
83-
"JobGroup": [],
84-
"UserGroup": [],
85-
}
76+
assert "VO" in result["Value"]
8677

8778

8879
def test_generateDelayedPlot(putAndDelete):

tests/Integration/Monitoring/Test_WebAppClient.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
def test_WMSAdministratorClient():
1212
res = WebAppClient().getSiteSummaryWeb({}, [], 0, 100)
1313
assert res["OK"], res["Message"]
14-
assert res["Value"]["TotalRecords"] in [0, 1, 2, 34]
1514

1615
res = WebAppClient().getSiteSummarySelectors()
1716
assert res["OK"], res["Message"]

tests/Integration/WorkloadManagementSystem/Test_Client_WMS.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ def test_JobStateUpdateAndJobMonitoringMultiple(lfn: str) -> None:
408408
try:
409409
res = jobMonitoringClient.getSites()
410410
assert res["OK"], res["Message"]
411-
assert set(res["Value"]) <= {"ANY", "DIRAC.Jenkins.ch", "Site"}
412411

413412
res = jobMonitoringClient.getJobTypes()
414413
assert res["OK"], res["Message"]

tests/Integration/WorkloadManagementSystem/Test_PilotAgentsDB.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,16 +249,16 @@ def test_summarySnapshot():
249249
sql = f"INSERT INTO PilotAgents (InitialJobID, CurrentJobID, PilotJobReference, PilotStamp, DestinationSite, Queue, GridSite, VO, GridType, BenchMark, SubmissionTime, LastUpdateTime, Status, StatusReason, AccountingSent) VALUES ({placeholders})"
250250
res = paDB._updatemany(sql, processed_data)
251251
assert res["OK"], res["Message"]
252-
sql = "SELECT * FROM PilotsHistorySummary ORDER BY GridSite, GridType, Status, VO;"
252+
sql = "SELECT * FROM PilotsHistorySummary ORDER BY GridSite, DestinationSite, Status, VO;"
253253
result = PilotAgentsDB()._query(sql)
254254
assert result["OK"], result["Message"]
255255
values = result["Value"][1]
256256
assert len(values) == 5, "Expected 5 record in the summary"
257257
# Check it corresponds to the basic "GROUP BY" query
258-
sql = "SELECT GridSite, GridType, Status, VO, COUNT(*) FROM PilotAgents GROUP BY GridSite, GridType, Status, VO ORDER BY GridSite, Status, VO;"
258+
sql = "SELECT GridSite, DestinationSite, Status, VO, COUNT(*) FROM PilotAgents GROUP BY GridSite, DestinationSite, Status, VO ORDER BY GridSite, DestinationSite, Status, VO;"
259259
result_grouped = PilotAgentsDB()._query(sql)
260260
assert result_grouped["OK"], result_grouped["Message"]
261-
sql = "SELECT * FROM PilotsHistorySummary ORDER BY GridSite, Status, VO;"
261+
sql = "SELECT * FROM PilotsHistorySummary ORDER BY GridSite, DestinationSite, Status, VO;"
262262
result_summary = PilotAgentsDB()._query(sql)
263263
assert result_summary["OK"], result_summary["Message"]
264264
assert result_grouped["Value"] == result_summary["Value"], "Summary and grouped query results differ"
@@ -274,10 +274,10 @@ def test_summarySnapshot():
274274
res = paDB._update(sql)
275275
assert res["OK"], res["Message"]
276276
# Check it corresponds to the basic "GROUP BY" query
277-
sql = "SELECT GridSite, GridType, Status, VO, COUNT(*) FROM PilotAgents GROUP BY GridSite, GridType, Status, VO ORDER BY GridSite, Status, VO;"
277+
sql = "SELECT GridSite, DestinationSite, Status, VO, COUNT(*) FROM PilotAgents GROUP BY GridSite, DestinationSite, Status, VO ORDER BY GridSite, DestinationSite, Status, VO;"
278278
result_grouped = PilotAgentsDB()._query(sql)
279279
assert result_grouped["OK"], result_grouped["Message"]
280-
sql = "select * FROM PilotsHistorySummary ORDER BY GridSite, Status, VO;"
280+
sql = "select * FROM PilotsHistorySummary ORDER BY GridSite, DestinationSite, Status, VO;"
281281
result_summary = PilotAgentsDB()._query(sql)
282282
assert result_summary["OK"], result_summary["Message"]
283283
assert result_grouped["Value"] == result_summary["Value"], "Summary and grouped query results differ"

0 commit comments

Comments
 (0)