Skip to content

Commit 95b07a5

Browse files
committed
test
1 parent 3d5278c commit 95b07a5

File tree

3 files changed

+31
-10
lines changed

3 files changed

+31
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2-
"workflowId": "UInt64",
3-
"jobId": "UInt64",
4-
"runAttempt": "UInt32",
5-
"repo": "String",
6-
"type": "String"
2+
"params": {
3+
"workflowId": "UInt64",
4+
"jobId": "UInt64",
5+
"runAttempt": "UInt32",
6+
"repo": "String",
7+
"type": "String"
8+
},
9+
"tests":[]
710
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2-
"workflowId": "UInt64",
3-
"jobId": "UInt64",
4-
"runAttempt": "UInt32",
5-
"repo": "String",
6-
"type": "String"
2+
"params": {
3+
"workflowId": "UInt64",
4+
"jobId": "UInt64",
5+
"runAttempt": "UInt32",
6+
"repo": "String",
7+
"type": "String"
8+
},
9+
"tests":[]
710
}

torchci/lib/utilization/fetchUtilization.test.ts

+15
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,25 @@ describe("fetchUtilization", () => {
270270
// Assert query sent to clickhouse
271271
expect(mockQuery).toHaveBeenCalledTimes(2);
272272
const firstQuery = mockQuery.mock.calls[0][0];
273+
expect(firstQuery.query_params).toEqual({
274+
workflowId: "1234",
275+
jobId: "2345",
276+
runAttempt: "1",
277+
repo: "pytorch/pytorch",
278+
type: "utilization",
279+
});
280+
273281
expect(
274282
firstQuery.query.includes("oss_ci_utilization_metadata")
275283
).toBeTruthy();
276284
const secondQuery = mockQuery.mock.calls[1][0];
285+
expect(secondQuery.query_params).toEqual({
286+
workflowId: "1234",
287+
jobId: "2345",
288+
runAttempt: "1",
289+
repo: "pytorch/pytorch",
290+
type: "utilization",
291+
});
277292
expect(secondQuery.query.includes("oss_ci_time_series")).toBeTruthy();
278293
});
279294
});

0 commit comments

Comments
 (0)