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

Fix iptables.flush state: Do not force 'filter' table when flushing #34306

Merged
merged 1 commit into from
Jun 28, 2016
Merged

Fix iptables.flush state: Do not force 'filter' table when flushing #34306

merged 1 commit into from
Jun 28, 2016

Conversation

ghedo
Copy link
Contributor

@ghedo ghedo commented Jun 27, 2016

What does this PR do?

Makes table argument of iptables.flush state work.

The "table" argument is already part of the function signature, this means
that flush() will always force the "filter" table even when the user sets
a different one.

Previous Behavior

table was always set to filter.

New Behavior

table is set to whatever the user passes (or filter if the user doesn't set anything).

Tests written?

No

@cachedout
Copy link
Contributor

Looks like a unit test here may need to be adjusted to confirm with this behavior. Could you please take a look?

@ghedo
Copy link
Contributor Author

ghedo commented Jun 27, 2016

@cachedout ah yes, I didn't realize there were tests for that already. I'll look into it, but it seems to me that commit fd03627 was wrong, since the first argument passed to assertDictEqual()was created with table='' and not table='filter'.

In any case I'll also try to add additional cases to test default and non-default tables to get better coverage.

The "table" argument is already part of the function signature, this means
that flush() will always force the "filter" table even when the user sets
a different one.
@cachedout cachedout merged commit 046bdaa into saltstack:2015.8 Jun 28, 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.

2 participants