Skip to content

Commit

Permalink
Base tmpdir on cwd in auxiliary/callback tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisspyB committed Nov 27, 2024
1 parent 718cfc1 commit 8a31f21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions tests/fdb/api/test_auxiliary.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "eckit/testing/Test.h"
#include "eckit/filesystem/TmpDir.h"
#include "eckit/filesystem/LocalPathName.h"
#include "metkit/mars/MarsRequest.h"
#include "fdb5/api/FDB.h"
#include "fdb5/api/helpers/FDBToolRequest.h"
Expand Down Expand Up @@ -64,8 +65,7 @@ std::set<eckit::PathName> setup(FDB& fdb) {
//----------------------------------------------------------------------------------------------------------------------

CASE("Wipe with extensions") {

eckit::TmpDir tmpdir;
eckit::TmpDir tmpdir(eckit::LocalPathName::cwd().c_str());
eckit::testing::SetEnv env_config{"FDB_ROOT_DIRECTORY", tmpdir.asString().c_str()};

eckit::testing::SetEnv env_extensions{"FDB_AUX_EXTENSIONS", "foo,bar"};
Expand Down Expand Up @@ -93,8 +93,7 @@ CASE("Wipe with extensions") {
}

CASE("Purge with extensions") {

eckit::TmpDir tmpdir;
eckit::TmpDir tmpdir(eckit::LocalPathName::cwd().c_str());
eckit::testing::SetEnv env_config{"FDB_ROOT_DIRECTORY", tmpdir.asString().c_str()};

eckit::testing::SetEnv env_extensions{"FDB_AUX_EXTENSIONS", "foo,bar"};
Expand Down
3 changes: 2 additions & 1 deletion tests/fdb/api/test_callback.cc
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include "eckit/testing/Test.h"
#include "eckit/filesystem/TmpDir.h"
#include "eckit/filesystem/LocalPathName.h"
#include "fdb5/api/FDB.h"

namespace fdb5::test {

//----------------------------------------------------------------------------------------------------------------------
CASE("Archive and flush callback") {

eckit::TmpDir tmpdir;
eckit::TmpDir tmpdir(eckit::LocalPathName::cwd().c_str());
eckit::testing::SetEnv env_config{"FDB_ROOT_DIRECTORY", tmpdir.asString().c_str()};

FDB fdb;
Expand Down

0 comments on commit 8a31f21

Please sign in to comment.