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

Patching v3 #21

Merged
merged 22 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add type for selection of firewall
  • Loading branch information
rwaffen committed Mar 13, 2023
commit d59febad6edd56f9e432f1de19ac730a96a60330
37 changes: 37 additions & 0 deletions spec/type_aliases/firewall.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'K8s::Firewall' do
describe 'valid firewall' do
%w[
iptables
firewalld
].each do |value|
describe value.inspect do
it { is_expected.to allow_value(value) }
end
end
end

describe 'invalid firewall' do
[
nil,
[nil],
[nil, nil],
{ 'foo' => 'bar' },
{},
'',
's',
'mailto:',
'blah',
'199',
600,
1_000,
].each do |value|
describe value.inspect do
it { is_expected.not_to allow_value(value) }
end
end
end
end
5 changes: 5 additions & 0 deletions types/firewall.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @summary a type to describe the type of the firewall to use
type K8s::Firewall = Enum[
'iptables',
'firewalld',
]