Fix bugs and failed testcases

This commit is contained in:
2024-07-04 14:14:27 +02:00
parent 1b70596735
commit 80c46bea7f
7 changed files with 833 additions and 802 deletions

View File

@@ -51,7 +51,7 @@ func TestInit(t *testing.T) {
if version != 1 {
t.Fail()
}
if len(fsa.clusters) != 3 || fsa.clusters[0] != "emmy" {
if len(fsa.clusters) != 3 || fsa.clusters[1] != "emmy" {
t.Fail()
}
}

View File

@@ -16,8 +16,6 @@ import (
// Common subset of Job and JobMeta. Use one of those, not this type directly.
type BaseJob struct {
Footprint map[string]float64 `json:"footPrint"`
MetaData map[string]string `json:"metaData"`
Cluster string `json:"cluster" db:"cluster" example:"fritz"`
SubCluster string `json:"subCluster" db:"subcluster" example:"main"`
Partition string `json:"partition,omitempty" db:"partition" example:"main"`
@@ -27,8 +25,10 @@ type BaseJob struct {
Tags []*Tag `json:"tags,omitempty"`
RawFootprint []byte `json:"-" db:"footprint"`
RawMetaData []byte `json:"-" db:"meta_data"`
Resources []*Resource `json:"resources"`
RawResources []byte `json:"-" db:"resources"`
Resources []*Resource `json:"resources"`
Footprint map[string]float64 `json:"footPrint"`
MetaData map[string]string `json:"metaData"`
ConcurrentJobs JobLinkResultList `json:"concurrentJobs"`
Energy float64 `json:"energy"`
ArrayJobId int64 `json:"arrayJobId,omitempty" db:"array_job_id" example:"123000"`