From 8d8b7e3048f06ef905818f06ea8507c07e4e097a Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Wed, 24 Jul 2024 13:13:17 +0200 Subject: [PATCH] [api][tests] truncate sda.files before each test --- sda/cmd/api/api_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sda/cmd/api/api_test.go b/sda/cmd/api/api_test.go index e52cfe0dd..0706bba39 100644 --- a/sda/cmd/api/api_test.go +++ b/sda/cmd/api/api_test.go @@ -385,6 +385,9 @@ func (suite *TestSuite) SetupTest() { Conf.API.DB, err = database.NewSDAdb(Conf.Database) assert.NoError(suite.T(), err) + _, err = Conf.API.DB.DB.Exec("TRUNCATE sda.files CASCADE") + assert.NoError(suite.T(), err) + Conf.Broker = broker.MQConf{ Host: "localhost", Port: mqPort,