Skip to content

Commit

Permalink
Revert teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
thomiceli committed Oct 31, 2024
1 parent 9bb4a1b commit 58ffb74
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions internal/web/test/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,17 @@ func teardown(t *testing.T, s *testServer) {
//err := db.Close()
//require.NoError(t, err, "Could not close database")

//err := os.RemoveAll(path.Join(config.GetHomeDir(), "tests"))
//require.NoError(t, err, "Could not remove repos directory")
//
//err = os.RemoveAll(path.Join(config.GetHomeDir(), "tmp", "repos"))
//require.NoError(t, err, "Could not remove repos directory")
//
//err = os.RemoveAll(path.Join(config.GetHomeDir(), "tmp", "sessions"))
//require.NoError(t, err, "Could not remove repos directory")
//
//err = db.TruncateDatabase()
//require.NoError(t, err, "Could not truncate database")
err := os.RemoveAll(path.Join(config.GetHomeDir(), "tests"))
require.NoError(t, err, "Could not remove repos directory")

err = os.RemoveAll(path.Join(config.GetHomeDir(), "tmp", "repos"))
require.NoError(t, err, "Could not remove repos directory")

err = os.RemoveAll(path.Join(config.GetHomeDir(), "tmp", "sessions"))
require.NoError(t, err, "Could not remove repos directory")

err = db.TruncateDatabase()
require.NoError(t, err, "Could not truncate database")

// err = os.RemoveAll(path.Join(config.C.OpengistHome, "testsindex"))
// require.NoError(t, err, "Could not remove repos directory")
Expand Down

0 comments on commit 58ffb74

Please sign in to comment.