Skip to content

Fix TestReadEnvironmentFile on macOS#38022

Merged
zmb3 merged 2 commits intomasterfrom
zmb3/fix-test-read-environment
Feb 14, 2024
Merged

Fix TestReadEnvironmentFile on macOS#38022
zmb3 merged 2 commits intomasterfrom
zmb3/fix-test-read-environment

Conversation

@zmb3
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 commented Feb 9, 2024

This test writes sample data to a temporary file and then tries to parse it. In #34177 we disallowed reading the environment file from a symlink, but the Go utilities we use to create temp files end up using symlinks on macOS.

Fix this by breaking out the core functionality such that it only requires an io.Reader instead of an os.File.

This test writes sample data to a temporary file and then tries to
parse it. In #34177 we disallowed reading the environment file from
a symlink, but the Go utilities we use to create temp files end up
using symlinks on macOS.

Fix this by breaking out the core functionality such that it only
requires an io.Reader instead of an os.File.
@zmb3 zmb3 added the no-changelog Indicates that a PR does not require a changelog entry label Feb 9, 2024
@zmb3 zmb3 requested a review from jentfoo February 9, 2024 17:45
@zmb3 zmb3 requested a review from rosstimothy February 12, 2024 17:38
Comment thread lib/utils/envutils/environment.go Outdated
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
@zmb3
Copy link
Copy Markdown
Collaborator Author

zmb3 commented Feb 13, 2024

@ibeckermayer @jakule PTAL

@zmb3 zmb3 enabled auto-merge February 13, 2024 15:27
@zmb3 zmb3 added this pull request to the merge queue Feb 14, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 14, 2024
@zmb3 zmb3 added this pull request to the merge queue Feb 14, 2024
Merged via the queue into master with commit 41fbc7b Feb 14, 2024
@zmb3 zmb3 deleted the zmb3/fix-test-read-environment branch February 14, 2024 01:07
@public-teleport-github-review-bot
Copy link
Copy Markdown

@zmb3 See the table below for backport results.

Branch Result
branch/v13 Create PR
branch/v14 Create PR
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants