Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ingest/ledgerbackend: change captive-core unit tests to use storage path in /tmp #4290

Closed
sreuland opened this issue Mar 16, 2022 · 3 comments · Fixed by #4296
Closed

ingest/ledgerbackend: change captive-core unit tests to use storage path in /tmp #4290

sreuland opened this issue Mar 16, 2022 · 3 comments · Fixed by #4296
Assignees
Labels

Comments

@sreuland
Copy link
Contributor

sreuland commented Mar 16, 2022

What version are you using?

2.15.1

What did you do?

go test ./ingest/ledgerbackend/...

What did you expect to see?

no temporary test files generated during test execution in checked out repo paths

What did you see instead?

several ./ingest/ledgerbackend/captive-core-xyz/ sub-folders were created in current checked out working directory

@sreuland sreuland added the bug label Mar 16, 2022
@leighmcculloch
Copy link
Member

change captive-core unit tests to cleanup storage path at finish

Is it possible to change the storage paths to a tmp directory, by using os.MkdirTemp? So that tests aren't writing new files to the repo during run.

@sreuland sreuland changed the title ingest/ledgerbackend: change captive-core unit tests to cleanup storage path at finish ingest/ledgerbackend: change captive-core unit tests to use storage path in /tmp Mar 16, 2022
@sreuland
Copy link
Contributor Author

yes, changed desired output to that behavior, probably should remove files at end of tests in any case.

@2opremio
Copy link
Contributor

Related: https://github.com/stellar/go/pull/3727/files (it contains how some tests were updated to write to /tmp for the same reason).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants