mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 12:51:40 +02:00
Refactor Jobs stats resolver
This commit is contained in:
24
internal/repository/stats_test.go
Normal file
24
internal/repository/stats_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg.
|
||||
// All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
package repository
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBuildJobStatsQuery(t *testing.T) {
|
||||
r := setup(t)
|
||||
q := r.buildJobsStatsQuery(nil, "USER")
|
||||
|
||||
sql, _, err := q.ToSql()
|
||||
noErr(t, err)
|
||||
|
||||
fmt.Printf("SQL: %s\n", sql)
|
||||
|
||||
if 1 != 5 {
|
||||
t.Errorf("wrong summary for diagnostic 3\ngot: %d \nwant: 1366", 5)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user