Skip to content

test: avoid changing the real system cache - #30

Open
tikkss wants to merge 1 commit into
red-data-tools:mainfrom
tikkss:test-keep-system-cache
Open

tikkss wants to merge 1 commit into
red-data-tools:mainfrom
tikkss:test-keep-system-cache

Conversation

@tikkss

@tikkss tikkss commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

GitHub: follow-up GH-29

Because tests must not change user data.

Only test_clear_cache still changes the real system cache with a dedicated cache ID (red-remote-input-test) because RemoteInput#clear_cache does not use RemoteInput#path.

GitHub: follow-up red-data-toolsGH-29

Because tests must not change user data.

Only `test_clear_cache` still changes the real system cache with a
dedicated cache ID (red-remote-input-test) because
`RemoteInput#clear_cache` does not use `RemoteInput#path`.
Comment thread test/test-remote-input.rb
Comment on lines +97 to +99
input.define_singleton_method(:path) do
sandbox_path
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Can we change CachePath#system_cache_path instead? We may want to add a new environment variable such as RED_REMOTE_INPUT_CACHE_DIR for this.

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.

2 participants