X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/988c59f51aa579ce8bf0eab1cc729e05a5ee5631..355173ba2e8c42b29011493d1d8c7cc4d69295c6:/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go?ds=inline diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go index b4033e78b0..23a8a0ca01 100644 --- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go +++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go @@ -367,17 +367,17 @@ func (s *StubbedSuite) TestSbatchInstanceTypeConstraint(c *C) { } for _, trial := range []struct { - types []arvados.InstanceType + types map[string]arvados.InstanceType sbatchArgs []string err error }{ // Choose node type => use --constraint arg { - types: []arvados.InstanceType{ - {Name: "a1.tiny", Price: 0.02, RAM: 128000000, VCPUs: 1}, - {Name: "a1.small", Price: 0.04, RAM: 256000000, VCPUs: 2}, - {Name: "a1.medium", Price: 0.08, RAM: 512000000, VCPUs: 4}, - {Name: "a1.large", Price: 0.16, RAM: 1024000000, VCPUs: 8}, + types: map[string]arvados.InstanceType{ + "a1.tiny": {Name: "a1.tiny", Price: 0.02, RAM: 128000000, VCPUs: 1}, + "a1.small": {Name: "a1.small", Price: 0.04, RAM: 256000000, VCPUs: 2}, + "a1.medium": {Name: "a1.medium", Price: 0.08, RAM: 512000000, VCPUs: 4}, + "a1.large": {Name: "a1.large", Price: 0.16, RAM: 1024000000, VCPUs: 8}, }, sbatchArgs: []string{"--constraint=instancetype=a1.medium"}, }, @@ -388,8 +388,8 @@ func (s *StubbedSuite) TestSbatchInstanceTypeConstraint(c *C) { }, // No node type is big enough => error { - types: []arvados.InstanceType{ - {Name: "a1.tiny", Price: 0.02, RAM: 128000000, VCPUs: 1}, + types: map[string]arvados.InstanceType{ + "a1.tiny": {Name: "a1.tiny", Price: 0.02, RAM: 128000000, VCPUs: 1}, }, err: dispatchcloud.ConstraintsNotSatisfiableError{}, },