Skip to content

Conversation

shangchengbabaiban
Copy link
Contributor

Overview

Fixed an issue in TestUserConfirmed where the standard input wasn't properly restored after test execution. The previous implementation attempted to restore os.Stdin to itself rather than to the original value.

This change saves the original stdin before modifying it and properly restores it in the defer function, ensuring that test cases don't affect each other and that the standard input is correctly reset after tests complete.

Signed-off-by: shangchengbabaiban <shuang.cui@live.cn>
@matthyx matthyx moved this to Triage in KS PRs tracking Apr 24, 2025
@matthyx matthyx moved this from Triage to Needs Reviewer in KS PRs tracking Apr 29, 2025
@matthyx matthyx merged commit 6b1bf07 into kubescape:master Apr 29, 2025
5 checks passed
@matthyx
Copy link
Contributor

matthyx commented Apr 29, 2025

thanks @shangchengbabaiban !

@matthyx matthyx moved this from Needs Reviewer to To Archive in KS PRs tracking May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants