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

More cleanup of test output and stability fixes #464

Merged
merged 13 commits into from
May 29, 2019
Merged

Conversation

zenspider
Copy link
Contributor

I've found some tests that fail in isolation but pass in combination, which is unfortunately hard to isolate... That'll have to come later.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This fixes using `m` and other tooling due to bad requires /
non-standard pathing.

Signed-off-by: Ryan Davis <zenspider@chef.io>
Signed-off-by: Ryan Davis <zenspider@chef.io>
There's legit problems being reported that we can't see because of
poor signal:noise.

Signed-off-by: Ryan Davis <zenspider@chef.io>
Signed-off-by: Ryan Davis <zenspider@chef.io>
Made the defaults into procs so they could probe the environment at
the time the test is run. This allows the require to be at the top of
the file to allow tests to be run in isolation instead of expecting a
fixed order.

Signed-off-by: Ryan Davis <zenspider@chef.io>
The constants are for restoring the globals only. Use the globals.

Signed-off-by: Ryan Davis <zenspider@chef.io>
I don't think the code should be writing to stdout/stderr at all, it
should use the logger... but in the meantime, capture and quiet the
output.

Signed-off-by: Ryan Davis <zenspider@chef.io>
Esp not at the method level. There doesn't seem to be a reason for it,
so I just made them local vars.

Signed-off-by: Ryan Davis <zenspider@chef.io>
…ated.

Signed-off-by: Ryan Davis <zenspider@chef.io>
Signed-off-by: Ryan Davis <zenspider@chef.io>
It's unstable and breaking other tests, but that's next...

Signed-off-by: Ryan Davis <zenspider@chef.io>
For some reason `plat.stubs(:cisco_ios?).returns(true)` winds up
creating the method and bombing out every ssh-oriented test that
follows. By creating the method and defaulting to false, all methods
are fine after the stub is cleared.

Basically, you shouldn't stub a method that doesn't exist... and when
you get down to it, you shouldn't design these methods that change
their behavior based on these sorts of internals. Use a factory method
instead and grab a proper subclass based on what you want to do.

But actually running the tests is a good start... so... yeah.

Signed-off-by: Ryan Davis <zenspider@chef.io>
@codeclimate
Copy link

codeclimate bot commented May 29, 2019

Code Climate has analyzed commit 8abde51 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Bug Risk 1

View more on Code Climate.

@zenspider zenspider requested a review from miah May 29, 2019 09:28
@zenspider zenspider merged commit 83fd858 into master May 29, 2019
@chef-ci chef-ci deleted the zenspider/green branch May 29, 2019 20:15
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