Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
31 changes: 17 additions & 14 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3186,16 +3186,17 @@ Alias of

```puppet
Struct[{
Optional['What'] => String[1],
Optional['Where'] => Stdlib::Unixpath,
Optional['Type'] => String[1],
Optional['Options'] => String[1],
Optional['SloppyOptions'] => Boolean,
Optional['LazyUnmount'] => Boolean,
Optional['ReadWriteOnly'] => Boolean,
Optional['ForceUnmount'] => Boolean,
Optional['DirectoryMode'] => Stdlib::Filemode,
Optional['TimeoutSec'] => String[0],
Optional['What'] => String[1],
Optional['Where'] => Stdlib::Unixpath,
Optional['Type'] => String[1],
Optional['Options'] => String[1],
Optional['SloppyOptions'] => Boolean,
Optional['LazyUnmount'] => Boolean,
Optional['ReadWriteOnly'] => Boolean,
Optional['ForceUnmount'] => Boolean,
Optional['DirectoryMode'] => Stdlib::Filemode,
Optional['TimeoutSec'] => String[0],
Optional['OOMScoreAdjust'] => Integer[-1000,1000],
}]
```

Expand Down Expand Up @@ -3504,6 +3505,7 @@ Struct[{
Optional['FileDescriptorName'] => String[1,255],
Optional['TriggerLimitIntervalSec'] => String[1],
Optional['TriggerLimitBurst'] => Integer[0],
Optional['OOMScoreAdjust'] => Integer[-1000,1000],
}]
```

Expand All @@ -3518,10 +3520,11 @@ Alias of

```puppet
Struct[{
Optional['What'] => String[1],
Optional['Options'] => String[1],
Optional['Priority'] => Integer,
Optional['TimeoutSec'] => Variant[Integer[0],String[0]]
Optional['What'] => String[1],
Optional['Options'] => String[1],
Optional['Priority'] => Integer,
Optional['TimeoutSec'] => Variant[Integer[0],String[0]],
Optional['OOMScoreAdjust'] => Integer[-1000,1000],
}]
```

Expand Down
9 changes: 9 additions & 0 deletions spec/type_aliases/systemd_unit_mount_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,13 @@
it { is_expected.to allow_value({ assert => true }) }
end
end

context 'with a key of OOMScoreAdjust' do
it {
is_expected.to allow_value({ 'OOMScoreAdjust' => 999 })
is_expected.to allow_value({ 'OOMScoreAdjust' => -999 })
is_expected.not_to allow_value({ 'OOMScoreAdjust' => 1005 })
is_expected.not_to allow_value({ 'OOMScoreAdjust' => '10' })
}
end
end
9 changes: 9 additions & 0 deletions spec/type_aliases/systemd_unit_socket_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@
it { is_expected.not_to allow_value({ assert => 'mything' }) }
end
end

context 'with a key of OOMScoreAdjust' do
it {
is_expected.to allow_value({ 'OOMScoreAdjust' => 999 })
is_expected.to allow_value({ 'OOMScoreAdjust' => -999 })
is_expected.not_to allow_value({ 'OOMScoreAdjust' => 1005 })
is_expected.not_to allow_value({ 'OOMScoreAdjust' => '10' })
}
end
end
9 changes: 9 additions & 0 deletions spec/type_aliases/systemd_unit_swap_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@
context 'with a key of Where' do
it { is_expected.not_to allow_value({ 'Where' => '/mnt/foo' }) }
end

context 'with a key of OOMScoreAdjust' do
it {
is_expected.to allow_value({ 'OOMScoreAdjust' => 999 })
is_expected.to allow_value({ 'OOMScoreAdjust' => -999 })
is_expected.not_to allow_value({ 'OOMScoreAdjust' => 1005 })
is_expected.not_to allow_value({ 'OOMScoreAdjust' => '10' })
}
end
end
21 changes: 11 additions & 10 deletions types/unit/mount.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
#
type Systemd::Unit::Mount = Struct[
{
Optional['What'] => String[1],
Optional['Where'] => Stdlib::Unixpath,
Optional['Type'] => String[1],
Optional['Options'] => String[1],
Optional['SloppyOptions'] => Boolean,
Optional['LazyUnmount'] => Boolean,
Optional['ReadWriteOnly'] => Boolean,
Optional['ForceUnmount'] => Boolean,
Optional['DirectoryMode'] => Stdlib::Filemode,
Optional['TimeoutSec'] => String[0],
Optional['What'] => String[1],
Optional['Where'] => Stdlib::Unixpath,
Optional['Type'] => String[1],
Optional['Options'] => String[1],
Optional['SloppyOptions'] => Boolean,
Optional['LazyUnmount'] => Boolean,
Optional['ReadWriteOnly'] => Boolean,
Optional['ForceUnmount'] => Boolean,
Optional['DirectoryMode'] => Stdlib::Filemode,
Optional['TimeoutSec'] => String[0],
Optional['OOMScoreAdjust'] => Integer[-1000,1000],
}
]
1 change: 1 addition & 0 deletions types/unit/socket.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@
Optional['FileDescriptorName'] => String[1,255],
Optional['TriggerLimitIntervalSec'] => String[1],
Optional['TriggerLimitBurst'] => Integer[0],
Optional['OOMScoreAdjust'] => Integer[-1000,1000],
}
]
9 changes: 5 additions & 4 deletions types/unit/swap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
#
type Systemd::Unit::Swap = Struct[
{
Optional['What'] => String[1],
Optional['Options'] => String[1],
Optional['Priority'] => Integer,
Optional['TimeoutSec'] => Variant[Integer[0],String[0]]
Optional['What'] => String[1],
Optional['Options'] => String[1],
Optional['Priority'] => Integer,
Optional['TimeoutSec'] => Variant[Integer[0],String[0]],
Optional['OOMScoreAdjust'] => Integer[-1000,1000],
}
]
Loading