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

make shell test work universally (hopefully) #585

Merged
merged 1 commit into from
Apr 26, 2022
Merged

Conversation

intrand
Copy link
Contributor

@intrand intrand commented Apr 26, 2022

Description

What's the goal of this PR?

make the tests for shells work universally. they were failing on some Ubuntu-based distros at the least.

What changes did you make?

The original test just made sure the result of newShellExecutor() matched an object hardcoded in Test_newShellExecutor().
Now we independently test the attributes of the resulting object against what we want from the test, using a regex to test got.Executable and EqualValues for got.Args, respectively.

What alternative solution should we consider, if any?

We talked about supporting a list of possible places to expect echo on a distribution, but what if the system configuration is valid and functional, but we didn't include support? Ultimately we decided to go with a regex so we likely won't have to look at this again for a long, long time.

@intrand intrand self-assigned this Apr 26, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@sudermanjr sudermanjr left a comment

Choose a reason for hiding this comment

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

👍

@intrand intrand merged commit 14a5cd2 into master Apr 26, 2022
@intrand intrand deleted the int/uni_tests branch April 26, 2022 18:56
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.

None yet

2 participants