16219: Test populated container fields.
authorTom Clegg <tom@tomclegg.ca>
Thu, 5 Mar 2020 21:42:39 +0000 (16:42 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 13 Apr 2020 15:20:17 +0000 (11:20 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

lib/dispatchcloud/container/queue_test.go

index 31f321488e686929080f2b1b6a9bdba7c7bfeff3..0075ee324ef8eb1d10a54207af97ddbf6a70b6bf 100644 (file)
@@ -106,6 +106,13 @@ func (suite *IntegrationSuite) TestGetLockUnlockCancel(c *check.C) {
 
 func (suite *IntegrationSuite) TestCancelIfNoInstanceType(c *check.C) {
        errorTypeChooser := func(ctr *arvados.Container) (arvados.InstanceType, error) {
+               // Make sure the relevant container fields are
+               // actually populated.
+               c.Check(ctr.ContainerImage, check.Equals, "test")
+               c.Check(ctr.RuntimeConstraints.VCPUs, check.Equals, 4)
+               c.Check(ctr.RuntimeConstraints.RAM, check.Equals, int64(12000000000))
+               c.Check(ctr.Mounts["/tmp"].Capacity, check.Equals, int64(24000000000))
+               c.Check(ctr.Mounts["/var/spool/cwl"].Capacity, check.Equals, int64(24000000000))
                return arvados.InstanceType{}, errors.New("no suitable instance type")
        }