use temp dir

This commit is contained in:
HiteshRepo 2024-01-30 17:51:08 +05:30
parent 7636882a53
commit a296b64f16
2 changed files with 1 additions and 7 deletions

View File

@ -180,7 +180,6 @@ jobs:
CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }} CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }}
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }} CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
S3_BUCKET: ${{ secrets.CI_TESTS_S3_BUCKET }} S3_BUCKET: ${{ secrets.CI_TESTS_S3_BUCKET }}
TEST_DIR: /tmp/corso-trusted-testlog
run: | run: |
set -euo pipefail set -euo pipefail
go test \ go test \

View File

@ -31,11 +31,6 @@ var AWSStorageCredEnvs = []string{
func NewPrefixedS3Storage(t tester.TestT) storage.Storage { func NewPrefixedS3Storage(t tester.TestT) storage.Storage {
now := tester.LogTimeOfTest(t) now := tester.LogTimeOfTest(t)
dir := t.TempDir()
if givenDir := os.Getenv("TEST_DIR"); len(givenDir) > 0 {
dir = givenDir
}
cfg, err := tconfig.ReadTestConfig() cfg, err := tconfig.ReadTestConfig()
require.NoError(t, err, "configuring storage from test file", clues.ToCore(err)) require.NoError(t, err, "configuring storage from test file", clues.ToCore(err))
@ -50,7 +45,7 @@ func NewPrefixedS3Storage(t tester.TestT) storage.Storage {
}, },
storage.CommonConfig{ storage.CommonConfig{
Corso: GetAndInsertCorso(""), Corso: GetAndInsertCorso(""),
KopiaCfgDir: dir, KopiaCfgDir: t.TempDir(),
}) })
require.NoErrorf(t, err, "creating storage: %+v", clues.ToCore(err)) require.NoErrorf(t, err, "creating storage: %+v", clues.ToCore(err))