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

This fixes cisco_ios? being defined to return true by default #481

Merged
merged 8 commits into from
Jul 22, 2019

Conversation

zenspider
Copy link
Contributor

Needs @btm's eyeballs on it.

Before this it was hundreds of lines long.

Signed-off-by: Ryan Davis <zenspider@chef.io>
Signed-off-by: Ryan Davis <zenspider@chef.io>
@zenspider zenspider requested review from miah and btm July 20, 2019 00:11
...so it doesn't puke all over my terminal. It's terrible.

Signed-off-by: Ryan Davis <zenspider@chef.io>
Signed-off-by: Ryan Davis <zenspider@chef.io>
Signed-off-by: Ryan Davis <zenspider@chef.io>
We really like String#+ and really shouldn't use it. Nor should we
repeat ourselves over and over.

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

Way back in the day, I put this method in in order for some stubbing
to work correctly. It probably shouldn't have gone into the PR tho
past getting the tests up and running.

What I figured out in this debugging pass was that there was some
infection from the tests caused by train using class-instance
variables that weren't getting reset when needed. Now I'm doing it on
every single test, which is probably overkill, but I'd rather have
stable and slow.

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

btm commented Jul 22, 2019

I built this gem and pushed it into the 4.7.18 InSpec omnibus build.

rake build
sudo /opt/inspec/embedded/bin/gem install pkg/train-2.1.17.gem
sudo /opt/inspec/embedded/bin/gem uninstall train -v 2.1.13
sudo vim /opt/inspec/bin/inspec # change appbundler pin

Works (with the --sudo-password workaround)

/opt/inspec/bin/inspec  exec --sudo-password cisco  ~/Downloads/cis-ciscoios15-level2-4.0.0.tar.gz --target ssh://cisco:cisco@office-switch.ninjr.org
[snip]
Profile Summary: 21 successful controls, 65 control failures, 0 controls skipped
Test Summary: 23 successful, 65 failures, 0 skipped

--enable-password still doesn't work, although that's a separate issue.

/opt/inspec/bin/inspec  exec --enable-password cisco  ~/Downloads/cis-ciscoios15-level2-4.0.0.tar.gz --target ssh://cisco:cisco@office-switch.ninjr.org
[snip]
Profile Summary: 12 successful controls, 30 control failures, 44 controls skipped
Test Summary: 19 successful, 32 failures, 45 skipped

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

3 participants