From 5bad4d72729d0f6e4649abf8e72991a9b0e6573f Mon Sep 17 00:00:00 2001 From: Nico Cesar Date: Tue, 17 Nov 2020 12:23:09 -0500 Subject: [PATCH] addressing https://dev.arvados.org/issues/17014#note-8 Tests Arvados-DCO-1.1-Signed-off-by: Nico Cesar --- lib/controller/integration_test.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/controller/integration_test.go b/lib/controller/integration_test.go index d50bc14537..998b177d11 100644 --- a/lib/controller/integration_test.go +++ b/lib/controller/integration_test.go @@ -522,12 +522,11 @@ func (s *IntegrationSuite) TestRuntimeTokenInCR(c *check.C) { c.Logf("cr.UUID: %s", cr.UUID) row := dbconn.QueryRowContext(rootctx1, `SELECT runtime_token from container_requests where uuid=$1`, cr.UUID) c.Assert(row, check.NotNil) - // runtimeToken is *string and not a string because the database has a NULL column for this - var runtimeToken *string - err = row.Scan(&runtimeToken) - c.Assert(err, check.IsNil) - c.Assert(runtimeToken, check.NotNil) - c.Assert(*runtimeToken, check.DeepEquals, *tt.expectedToken) + var token sql.NullString + row.Scan(&token) + if c.Check(token.Valid, check.Equals, true) { + c.Check(token.String, check.Equals, *tt.expectedToken) + } } } -- 2.30.2