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

Allow Type network_config to take a Numeric value for the MTU parameter #229

Merged
merged 1 commit into from
Aug 22, 2017

Conversation

lukebigum
Copy link
Contributor

It's feasible to provide a Numeric type to the MTU parameter in Puppet 4 (such as the result of a calculation). This patch allows the network_config Type to accept a Numeric as well as a String, and tests for all the same expected failure cases with numeric values.

@lukebigum
Copy link
Contributor Author

Bump. Anyone?

Copy link
Contributor

@igalic igalic left a comment

Choose a reason for hiding this comment

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

thank you for bumping this, and sorry for forgetting about you._.

if you have the time & energy to add this test, please go ahead, if not, we can merge this as-is.

expect do
Puppet::Type.type(:network_config).new(name: 'yay', mtu: 1500.1)
end.to raise_error
end
Copy link
Contributor

Choose a reason for hiding this comment

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

can you also add non-number tests, just to be sure?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are non numbered tests, they were the original tests - it assumed a String. I just added numerical tests.

@igalic igalic merged commit 1e69539 into voxpupuli:master Aug 22, 2017
@igalic
Copy link
Contributor

igalic commented Aug 22, 2017

thank you very much, @lukebigum!

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