Skip to content

test: use temporary config file in context delete test#334

Open
hazelmayank wants to merge 1 commit into
microcks:masterfrom
hazelmayank:test/use-tempdir-context-delete
Open

test: use temporary config file in context delete test#334
hazelmayank wants to merge 1 commit into
microcks:masterfrom
hazelmayank:test/use-tempdir-context-delete

Conversation

@hazelmayank
Copy link
Copy Markdown
Contributor

@hazelmayank hazelmayank commented May 8, 2026

Summary

This PR fixes TestDeleteContext by updating it to use a temporary config file created with t.TempDir() instead of writing to ./testdata/local.config.

On a clean checkout, cmd/testdata may not exist, which causes the test to fail with:

open ./testdata/local.config: no such file or directory

The test behavior remains unchanged, but it no longer depends on an untracked local directory.

Fixes #313
Related to #321

Test plan

go test ./cmd/... -run TestDeleteContext -v
go test ./...
go test ./cmd/... -count=3
make build-local

Signed-off-by: hazelmayank <mayankjeefinal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor : improve TestDeleteContext robustness and isolation using temporary directories

1 participant