-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ServiceActions: Unescape daemon names
This allows for use with templated services e.g. `[email protected]` as `@` is an invalid character in a dict key.
- Loading branch information
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,4 +76,9 @@ ok(command_history_ok(["systemctl reload daemon2.service"], ['daemon1']), | |
"run runs expected commands wrong (no daemon1)"); | ||
|
||
|
||
my $sa4 = CAF::ServiceActions->new(log => $obj); | ||
$sa4->add({daemon_40instance_2eservice => 'restart'}); | ||
is_deeply($sa4->{actions}, {restart => {'[email protected]' => 1}}, "add correctly unescapes instanced name"); | ||
|
||
|
||
done_testing; |