Skip to content

Commit b1f5ba9

Browse files
Update go.mod and go.sum to include new dependencies and bump existing ones
- Added `github.com/HdrHistogram/hdrhistogram-go` and `github.com/davecgh/go-spew` to `go.mod`. - Updated `github.com/tdewolff/test` from v1.0.10 to v1.0.11. - Cleaned up indirect dependencies in `go.mod` and updated checksums in `go.sum`. - Refactored import paths in several files to use the new package structure from `noku-team`.
1 parent 262edba commit b1f5ba9

File tree

5 files changed

+74
-81
lines changed

5 files changed

+74
-81
lines changed

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ go 1.23.0
55
toolchain go1.24.1
66

77
require (
8+
github.com/HdrHistogram/hdrhistogram-go v1.1.2
89
github.com/attestantio/go-eth2-client v0.25.2
10+
github.com/davecgh/go-spew v1.1.1
911
github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0
1012
github.com/ethereum/go-ethereum v1.15.11
1113
github.com/ethpandaops/ethwallclock v0.4.0
@@ -39,7 +41,6 @@ require (
3941
)
4042

4143
require (
42-
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
4344
github.com/KyleBanks/depth v1.2.1 // indirect
4445
github.com/Microsoft/go-winio v0.6.2 // indirect
4546
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
@@ -115,7 +116,7 @@ require (
115116
github.com/swaggo/files v1.0.1 // indirect
116117
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
117118
github.com/tdewolff/parse v2.3.4+incompatible // indirect
118-
github.com/tdewolff/test v1.0.10 // indirect
119+
github.com/tdewolff/test v1.0.11 // indirect
119120
github.com/tklauser/go-sysconf v0.3.14 // indirect
120121
github.com/tklauser/numcpus v0.8.0 // indirect
121122
github.com/wealdtech/go-bytesutil v1.2.1 // indirect

go.sum

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
1212
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
1313
github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI=
1414
github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI=
15+
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
16+
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
17+
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
1518
github.com/attestantio/go-eth2-client v0.25.2 h1:BHOva0HlJZ47HwALQuqqfIAQ6gRIo5P/iqGpphrMsCE=
1619
github.com/attestantio/go-eth2-client v0.25.2/go.mod h1:fvULSL9WtNskkOB4i+Yyr6BKpNHXvmpGZj9969fCrfY=
1720
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -118,6 +121,7 @@ github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn
118121
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
119122
github.com/go-sql-driver/mysql v1.9.2 h1:4cNKDYQ1I84SXslGddlsrMhc8k4LeDVj6Ad6WRjiHuU=
120123
github.com/go-sql-driver/mysql v1.9.2/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
124+
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
121125
github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I=
122126
github.com/goccy/go-yaml v1.11.3/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
123127
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
@@ -365,8 +369,8 @@ github.com/tdewolff/minify v2.3.6+incompatible h1:2hw5/9ZvxhWLvBUnHE06gElGYz+Jv9
365369
github.com/tdewolff/minify v2.3.6+incompatible/go.mod h1:9Ov578KJUmAWpS6NeZwRZyT56Uf6o3Mcz9CEsg8USYs=
366370
github.com/tdewolff/parse v2.3.4+incompatible h1:x05/cnGwIMf4ceLuDMBOdQ1qGniMoxpP46ghf0Qzh38=
367371
github.com/tdewolff/parse v2.3.4+incompatible/go.mod h1:8oBwCsVmUkgHO8M5iCzSIDtpzXOT0WXX9cWhz+bIzJQ=
368-
github.com/tdewolff/test v1.0.10 h1:uWiheaLgLcNFqHcdWveum7PQfMnIUTf9Kl3bFxrIoew=
369-
github.com/tdewolff/test v1.0.10/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
372+
github.com/tdewolff/test v1.0.11 h1:FdLbwQVHxqG16SlkGveC0JVyrJN62COWTRyUFzfbtBE=
373+
github.com/tdewolff/test v1.0.11/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8=
370374
github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU=
371375
github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY=
372376
github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY=
@@ -407,10 +411,24 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
407411
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
408412
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
409413
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
414+
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
415+
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
416+
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
410417
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
411418
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
419+
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
420+
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
421+
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
422+
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
423+
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
412424
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 h1:y5zboxd6LQAqYIhHnB48p0ByQ/GnQx2BE33L8BOHQkI=
413425
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6/go.mod h1:U6Lno4MTRCDY+Ba7aCcauB9T60gsv5s4ralQzP72ZoQ=
426+
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
427+
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
428+
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
429+
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
430+
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
431+
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
414432
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
415433
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
416434
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
@@ -426,14 +444,21 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
426444
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
427445
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
428446
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
447+
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
448+
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
449+
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
450+
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
429451
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
430452
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
453+
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
431454
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
432455
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
433456
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
434457
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
458+
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
435459
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
436460
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
461+
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
437462
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
438463
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
439464
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -461,6 +486,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
461486
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
462487
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
463488
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
489+
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
490+
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
464491
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
465492
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
466493
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -475,6 +502,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
475502
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
476503
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
477504
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
505+
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
506+
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
507+
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
478508
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
479509
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
480510
golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
@@ -486,6 +516,7 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn
486516
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
487517
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
488518
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
519+
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
489520
golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
490521
golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
491522
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -495,6 +526,7 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T
495526
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY=
496527
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
497528
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
529+
gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM=
498530
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
499531
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
500532
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=

pkg/coordinator/test/descriptor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"time"
1111

1212
"github.com/noku-team/assertoor/pkg/coordinator/types"
13-
"github.com/ethpandaops/assertoor/pkg/coordinator/types"
1413
"github.com/sirupsen/logrus"
1514
"gopkg.in/yaml.v3"
1615
)

pkg/coordinator/web/api/get_task_details_api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"strconv"
77
"time"
88

9-
"github.com/ethpandaops/assertoor/pkg/coordinator/types"
9+
"github.com/noku-team/assertoor/pkg/coordinator/types"
1010
"github.com/gorilla/mux"
1111
"gopkg.in/yaml.v3"
1212
)

pkg/coordinator/web/handlers/test_run.go

Lines changed: 36 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ import (
77
"strconv"
88
"time"
99

10-
"github.com/ethpandaops/assertoor/pkg/coordinator/db"
11-
"github.com/ethpandaops/assertoor/pkg/coordinator/types"
12-
"github.com/ethpandaops/assertoor/pkg/coordinator/web/api"
13-
"github.com/gorilla/mux"
1410
"github.com/noku-team/assertoor/pkg/coordinator/db"
1511
"github.com/noku-team/assertoor/pkg/coordinator/types"
12+
"github.com/noku-team/assertoor/pkg/coordinator/web/api"
13+
"github.com/gorilla/mux"
1614
"github.com/sirupsen/logrus"
1715
)
1816

@@ -22,39 +20,29 @@ type TestRunPage struct {
2220
Name string `json:"name"`
2321
IsStarted bool `json:"started"`
2422
IsCompleted bool `json:"completed"`
25-
StartTime time.Time `json:"start_time"`
26-
StopTime time.Time `json:"stop_time"`
27-
Timeout time.Duration `json:"timeout"`
23+
StartTime int64 `json:"start_time"`
24+
StopTime int64 `json:"stop_time"`
25+
Timeout int64 `json:"timeout"` // milliseconds
2826
Status string `json:"status"`
2927
IsSecTrimmed bool `json:"is_sec_trimmed"`
3028
Tasks []*TestRunTask `json:"tasks"`
3129
}
3230

3331
type TestRunTask struct {
34-
Index uint64 `json:"index"`
35-
ParentIndex uint64 `json:"parent_index"`
36-
GraphLevels []uint64 `json:"graph_levels"`
37-
HasChildren bool `json:"has_children"`
38-
Name string `json:"name"`
39-
Title string `json:"title"`
40-
IsStarted bool `json:"started"`
41-
IsCompleted bool `json:"completed"`
42-
StartTime time.Time `json:"start_time"`
43-
StopTime time.Time `json:"stop_time"`
44-
Timeout time.Duration `json:"timeout"`
45-
HasTimeout bool `json:"has_timeout"`
46-
RunTime time.Duration `json:"runtime"`
47-
HasRunTime bool `json:"has_runtime"`
48-
CustomRunTime time.Duration `json:"custom_runtime"`
49-
HasCustomRunTime bool `json:"has_custom_runtime"`
50-
Status string `json:"status"`
51-
Result string `json:"result"`
52-
ResultError string `json:"result_error"`
53-
Log []*TestRunTaskLog `json:"log"`
54-
ConfigYaml string `json:"config_yaml"`
55-
ResultYaml string `json:"result_yaml"`
56-
ResultFiles []*TestRunTaskResult `json:"result_files"`
57-
HaveResultFiles bool `json:"have_result_files"`
32+
Index uint64 `json:"index"`
33+
ParentIndex uint64 `json:"parent_index"`
34+
Name string `json:"name"`
35+
Title string `json:"title"`
36+
IsStarted bool `json:"started"`
37+
IsCompleted bool `json:"completed"`
38+
StartTime int64 `json:"start_time"`
39+
StopTime int64 `json:"stop_time"`
40+
Timeout int64 `json:"timeout"` // milliseconds
41+
RunTime int64 `json:"runtime"` // milliseconds
42+
Status string `json:"status"`
43+
Result string `json:"result"`
44+
ResultError string `json:"result_error"`
45+
ResultFiles []*TestRunTaskResult `json:"result_files"`
5846
}
5947

6048
type TestRunTaskResult struct {
@@ -150,9 +138,9 @@ func (fh *FrontendHandler) getTestRunPageData(runID uint64) (*TestRunPage, error
150138
RunID: runID,
151139
TestID: test.TestID(),
152140
Name: test.Name(),
153-
StartTime: test.StartTime(),
154-
StopTime: test.StopTime(),
155-
Timeout: test.Timeout(),
141+
StartTime: test.StartTime().UnixMilli(),
142+
StopTime: test.StopTime().UnixMilli(),
143+
Timeout: test.Timeout().Milliseconds(),
156144
Status: string(test.Status()),
157145
IsSecTrimmed: fh.securityTrimmed,
158146
}
@@ -169,6 +157,8 @@ func (fh *FrontendHandler) getTestRunPageData(runID uint64) (*TestRunPage, error
169157
pageData.IsCompleted = true
170158
case types.TestStatusSkipped:
171159
case types.TestStatusAborted:
160+
pageData.IsStarted = true
161+
pageData.IsCompleted = true
172162
}
173163

174164
// get result headers
@@ -187,13 +177,13 @@ func (fh *FrontendHandler) getTestRunPageData(runID uint64) (*TestRunPage, error
187177

188178
taskScheduler := test.GetTaskScheduler()
189179
if taskScheduler != nil && taskScheduler.GetTaskCount() > 0 {
190-
indentationMap := map[uint64]int{}
180+
taskMap := make(map[uint64]*TestRunTask)
191181

192182
allTasks := taskScheduler.GetAllTasks()
193183
cleanupTasks := taskScheduler.GetAllCleanupTasks()
194184
allTasks = append(allTasks, cleanupTasks...)
195185

196-
for idx, task := range allTasks {
186+
for _, task := range allTasks {
197187
taskState := taskScheduler.GetTaskState(task)
198188
taskStatus := taskState.GetTaskStatus()
199189

@@ -204,44 +194,14 @@ func (fh *FrontendHandler) getTestRunPageData(runID uint64) (*TestRunPage, error
204194
Title: taskState.Title(),
205195
IsStarted: taskStatus.IsStarted,
206196
IsCompleted: taskStatus.IsStarted && !taskStatus.IsRunning,
207-
StartTime: taskStatus.StartTime,
208-
StopTime: taskStatus.StopTime,
209-
Timeout: taskState.Timeout(),
210-
HasTimeout: taskState.Timeout() > 0,
211-
GraphLevels: []uint64{},
212-
}
213-
214-
indentation := 0
215-
if taskData.ParentIndex > 0 {
216-
indentation = indentationMap[taskData.ParentIndex] + 1
217-
}
218-
219-
indentationMap[taskData.Index] = indentation
220-
221-
if indentation > 0 {
222-
for i := 0; i < indentation; i++ {
223-
taskData.GraphLevels = append(taskData.GraphLevels, 0)
224-
}
225-
226-
taskData.GraphLevels[indentation-1] = 3
227-
228-
for i := idx - 1; i >= 0; i-- {
229-
if pageData.Tasks[i].Index == taskData.ParentIndex {
230-
pageData.Tasks[i].HasChildren = true
231-
break
232-
}
233-
234-
if len(pageData.Tasks[i].GraphLevels) < indentation {
235-
break
236-
}
237-
238-
if pageData.Tasks[i].ParentIndex == taskData.ParentIndex {
239-
pageData.Tasks[i].GraphLevels[indentation-1] = 2
240-
break
241-
}
242-
243-
pageData.Tasks[i].GraphLevels[indentation-1] = 1
244-
}
197+
StartTime: taskStatus.StartTime.UnixMilli(),
198+
StopTime: taskStatus.StopTime.UnixMilli(),
199+
Timeout: taskState.Timeout().Milliseconds(),
200+
RunTime: time.Since(taskStatus.StartTime).Milliseconds(),
201+
Status: "complete",
202+
Result: "unknown",
203+
ResultError: "",
204+
ResultFiles: nil,
245205
}
246206

247207
switch {
@@ -287,8 +247,9 @@ func (fh *FrontendHandler) getTestRunPageData(runID uint64) (*TestRunPage, error
287247
}
288248

289249
pageData.Tasks = append(pageData.Tasks, taskData)
250+
taskMap[taskData.Index] = taskData
290251
}
291252
}
292253

293254
return pageData, nil
294-
}
255+
}

0 commit comments

Comments
 (0)