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

Adding AIX classes, tests, and targetted ssh testing #333

Merged
merged 55 commits into from
Jan 15, 2016

Conversation

foobarbam
Copy link
Contributor

rake test:ssh[user@server]
sh -c bin/inspec exec /home/foobarbam/src/gems/inspec/test/integration/test/integration/default/* --sudo -t ssh://user@server --key_files=/home/foobarbam/.ssh/id_rsa
"You are currently running on OS family: aix, OS release: 6.1"
.............................................................................................................

Finished in 21.65 seconds (files took 19.21 seconds to load)
109 examples, 0 failures

@chris-rock
Copy link
Contributor

@foobarbam huge addition. Thank you very much for this great Christmas present. I am going to test this PR as my my first task next week.

when 'aix'
describe package('bos.rte') do
it { should be_installed }
its('version') { should match /^(6|7)\.1[.|\d]+\d/ }
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that should be its('version') { should match /^(6|7)[.|\d]+\d/ }. Then it works out of the box with AIX 7.2 beta

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@chris-rock
Copy link
Contributor

Hi @foobarbam thanks again for this great addition. Some questions:

  • How have you prepared the AIX machine? I think we should automate the configuration with chef cookbooks. What do you think?
  • I have troubles with lsof on my PDP AIX machines. Is this a standard command we can expect on all AIX machines?
  • I am missing unit tests for the AIX operating system. We should test the parsing on a unit level, to ensure nobody will break the AIX features in future. Those are located at https://github.com/chef/inspec/tree/master/test/unit/resources
  • Could you please rebase on master
  • Some commits have the same title, can we squash some of the commits

Here are my failure reports:

Please let me know if you need help.

# }
proc_id = port_id = nil
lsof_cmd.stdout.each_line do |line|
line.chomp!
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we extract the line parser in a separate function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

of course

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@foobarbam
Copy link
Contributor Author

sorry guys, missed most of these comments due to taking the holidays off. I'll be back next week to address them all.

Thanks for the feedback!

@chris-rock
Copy link
Contributor

awesome work @foobarbam thanks for adding this great AIX support

chris-rock added a commit that referenced this pull request Jan 15, 2016
Adding AIX classes, tests, and targetted ssh testing
@chris-rock chris-rock merged commit b278e47 into inspec:master Jan 15, 2016
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