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

UNIT_TESTS_FAIL: Fedora 18 support #176

Closed
wants to merge 2 commits into from
Closed

UNIT_TESTS_FAIL: Fedora 18 support #176

wants to merge 2 commits into from

Conversation

ecbypi
Copy link
Contributor

@ecbypi ecbypi commented Apr 30, 2013

Based on the discussion in #145, this enables iptables on Fedora 18 and disabled firewalld. Determining the persistence command has been changed to compare regexes against the operatingsystem and operatingsystemrelease instead of osfamily since the command is no longer solely dependent on osfamily. Special cases (Fedora 18, Fedora 15-17), go at the top of the case statement. These changes are structured in a way that these changes can easily be applied to RHEL 7 if desired.

@kbarber-jenkins-bot
Copy link

Can one of the admins verify this patch?

@kbarber
Copy link
Contributor

kbarber commented May 1, 2013

@ecbypi the travis tests are failing on this patch: https://travis-ci.org/puppetlabs/puppetlabs-firewall/jobs/6772125

@kbarber
Copy link
Contributor

kbarber commented May 1, 2013

ok to test

@kbarber-jenkins-bot
Copy link

Merged build triggered. (Status: PENDING, Details: null)

@kbarber-jenkins-bot
Copy link

Merged build started. (Status: PENDING, Details: http://box.bob.sh:8080/job/puppetlabs-firewall-system/158/)

@kbarber-jenkins-bot
Copy link

Merged build finished. (Status: SUCCESS, Details: http://box.bob.sh:8080/job/puppetlabs-firewall-system/158/)

@kbarber-jenkins-bot
Copy link

Can one of the admins verify this patch?

@kbarber
Copy link
Contributor

kbarber commented May 1, 2013

@ecbypi btw - on the system testing front, although Jenkins reported 'Success' it was never really tested on Fedora 18, as I have it in a special exclusion list until it worked.

I did however run up a custom job here: http://box.bob.sh:8080/job/puppetlabs-firewall-system-fedora-18/1/RSPEC_SET=fedora-18-x64/consoleFull which shows how your code ran against Fedora 18. As you can see beyond the basic class we still have some parser bugs to solve for it to work 'out of the box', especially with existing rules.

Having said that, I think the class patch you have here looks pretty good ... this is a great start to getting Fedora 18 support.

@ecbypi
Copy link
Contributor Author

ecbypi commented May 1, 2013

@kbarber Ok. I'll look over this tonight. Is it possible to recreate the test run you linked to for fedora 18 on my local machine?

@kbarber
Copy link
Contributor

kbarber commented May 1, 2013

@ecbypi system tests can be replicated by:

  • Installing virtualbox 4.2.10+
  • Installing vagrant 1.2.x+

Grabbing the gems using 'bundle update'

Then running:

rake spec:system

Fedora specifically can be tested with:

RSPEC_SET="fedora-18-x64" rake spec:system

The test framework is fairly new so let me know if you have issues. I've tested this on both Linux (Debian 7 in this case) and OS X 10.8.x.

@ecbypi
Copy link
Contributor Author

ecbypi commented May 1, 2013

Sweet. The RSPEC_SET is what I was looking for.

@kbarber
Copy link
Contributor

kbarber commented Jun 10, 2013

Any progress on this @ecbypi ?

@ecbypi
Copy link
Contributor Author

ecbypi commented Jun 10, 2013

Unfortunately no. It's been a busy month and it keeps slipping my mind. I'll actually take a look at things tonight. Sorry for the delay.

@kbarber-jenkins-bot
Copy link

Can one of the admins verify this patch?

@ecbypi
Copy link
Contributor Author

ecbypi commented Jun 14, 2013

@kbarber I'm still in the process of debugging failures. I noticed that on in spec/system/class_spec.rb, the spec fails because changes are being made on Fedora 18 to install the package, stop firewalld and start iptables, resulting in an exit code of 2, instead of 0. It seems sufficient to require that the exit status not equal 1 (or 1 and 6).

What are your thoughts?

@kbarber
Copy link
Contributor

kbarber commented Jun 14, 2013

I'm still in the process of debugging failures. I noticed that on in spec/system/class_spec.rb, the spec fails because changes are being made on Fedora 18 to install the package, stop firewalld and start iptables, resulting in an exit code of 2, instead of 0. It seems sufficient to require that the exit status not equal 1 (or 1 and 6).

Some tests have changed since you applied this patch, you might want to rebase. The current tests always test to make sure the exit_code first up is not 1 ... then the second tests for non zero. This is a pretty normal idempotence test. Unless of course, the current code you propose requires more than 1 puppet run to do everything?

@apenney
Copy link
Contributor

apenney commented Apr 3, 2014

I think this is now fixed upstream. I'm going to close this for now but feel fre to reopen and rebase if this is still a problem.

@apenney apenney closed this Apr 3, 2014
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.

4 participants