fixing db path in tests.

This commit is contained in:
Jason Kulatunga 2022-09-26 19:50:00 -07:00
parent 7e773ce2c1
commit 631bb9bdcd
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ func TestCernerClient_SyncAll(t *testing.T) {
defer mockCtrl.Finish() defer mockCtrl.Finish()
fakeConfig := mock_config.NewMockInterface(mockCtrl) fakeConfig := mock_config.NewMockInterface(mockCtrl)
testDatabase, err := ioutil.TempFile("testdata", "fasten.db") testDatabase, err := ioutil.TempFile("", "fasten.db")
require.NoError(t, err) require.NoError(t, err)
defer os.Remove(testDatabase.Name()) defer os.Remove(testDatabase.Name())
fakeConfig.EXPECT().GetString("web.database.location").AnyTimes().Return(testDatabase.Name()) fakeConfig.EXPECT().GetString("web.database.location").AnyTimes().Return(testDatabase.Name())

View File

@ -21,7 +21,7 @@ func TestLogicaClient_SyncAll(t *testing.T) {
defer mockCtrl.Finish() defer mockCtrl.Finish()
fakeConfig := mock_config.NewMockInterface(mockCtrl) fakeConfig := mock_config.NewMockInterface(mockCtrl)
testDatabase, err := ioutil.TempFile("testdata", "fasten.db") testDatabase, err := ioutil.TempFile("", "fasten.db")
require.NoError(t, err) require.NoError(t, err)
defer os.Remove(testDatabase.Name()) defer os.Remove(testDatabase.Name())
fakeConfig.EXPECT().GetString("web.database.location").AnyTimes().Return(testDatabase.Name()) fakeConfig.EXPECT().GetString("web.database.location").AnyTimes().Return(testDatabase.Name())