-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add e2e test for jobstats package
* Add supporting fixtures Signed-off-by: mahendrapaipuri <[email protected]>
- Loading branch information
1 parent
136bbe8
commit f27a5d4
Showing
3 changed files
with
76 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
PRAGMA foreign_keys=OFF; | ||
BEGIN TRANSACTION; | ||
CREATE TABLE jobs ( | ||
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"Jobid" TEXT, | ||
"Jobuuid" TEXT, | ||
"Cluster" TEXT, | ||
"Partition" TEXT, | ||
"Account" TEXT, | ||
"Grp" TEXT, | ||
"Gid" TEXT, | ||
"Usr" TEXT, | ||
"Uid" TEXT, | ||
"Submit" TEXT, | ||
"Eligible" TEXT, | ||
"Start" TEXT, | ||
"End" TEXT, | ||
"Elapsed" TEXT, | ||
"Elapsedraw" TEXT, | ||
"Exitcode" TEXT, | ||
"State" TEXT, | ||
"Nnodes" TEXT, | ||
"Ncpus" TEXT, | ||
"Reqcpus" TEXT, | ||
"Reqmem" TEXT, | ||
"Reqtres" TEXT, | ||
"Timelimit" TEXT, | ||
"Nodelist" TEXT, | ||
"NodelistExp" TEXT, | ||
"Jobname" TEXT, | ||
"Workdir" TEXT | ||
); | ||
INSERT INTO jobs VALUES(1,'1479763','d4b98df4-e636-ea14-59ff-37db752e6c30','test','part1','acc1','grp','1000','usr','1000','2023-02-21T14:37:02','2023-02-21T14:37:02','2023-02-21T14:37:07','2023-02-21T15:26:29','00:49:22','2962','0:0','CANCELLED by 302137','1','2','1','4G','cpu=1,mem=4G,node=1','01:00:00','compute-0','compute-0','test_script2','/home/usr'); | ||
INSERT INTO jobs VALUES(2,'1481508','44cbb62d-db8f-c0c5-e123-76766afbd190','test','part1','acc1','grp','1000','usr','1000','2023-02-21T15:48:20','2023-02-21T15:48:20','2023-02-21T15:49:06','2023-02-21T15:57:23','00:08:17','497','0:0','CANCELLED by 302137','2','40','40','80G','cpu=40,mem=80G,node=2','01:00:00','compute-[0-2]','compute-0|compute-1|compute-2','test_script2','/home/usr'); | ||
DELETE FROM sqlite_sequence; | ||
INSERT INTO sqlite_sequence VALUES('jobs',2); | ||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
echo """JobID|Cluster|Partition|Account|Group|GID|User|UID|Submit|Eligible|Start|End|Elapsed|ElapsedRaw|ExitCode|State|NNodes|NCPUS|ReqCPUS|ReqMem|ReqTRES|Timelimit|NodeList|JobName|WorkDir | ||
1479763|test|part1|acc1|grp|1000|usr|1000|2023-02-21T14:37:02|2023-02-21T14:37:02|2023-02-21T14:37:07|2023-02-21T15:26:29|00:49:22|2962|0:0|CANCELLED by 302137|1|2|1|4G|cpu=1,mem=4G,node=1|01:00:00|compute-0|test_script2|/home/usr | ||
1481508|test|part1|acc1|grp|1000|usr|1000|2023-02-21T15:48:20|2023-02-21T15:48:20|2023-02-21T15:49:06|2023-02-21T15:57:23|00:08:17|497|0:0|CANCELLED by 302137|2|40|40|80G|cpu=40,mem=80G,node=2|01:00:00|compute-[0-2]|test_script2|/home/usr | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters