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

Don't write out meta parameter when unset #467

Merged
merged 2 commits into from
Feb 4, 2019
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
22 changes: 11 additions & 11 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@
# }
#
define consul::service(
$address = undef,
$checks = [],
$enable_tag_override = false,
$ensure = present,
$id = $title,
$port = undef,
$service_name = $title,
Hash $service_config_hash = {},
$tags = [],
$token = undef,
Hash[String[1], String[1]] $meta = {},
$address = undef,
$checks = [],
$enable_tag_override = false,
$ensure = present,
$id = $title,
$port = undef,
$service_name = $title,
Hash $service_config_hash = {},
$tags = [],
$token = undef,
Optional[Hash[String[1], String[1]]] $meta = undef,
) {

include consul
Expand Down
2 changes: 0 additions & 2 deletions spec/defines/consul_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
it {
should contain_file("/etc/consul/service_my_service.json") \
.with_content(/"service" *: *\{/) \
.with_content(/"meta" *: *\{\}/) \
.with_content(/"id" *: *"my_service"/) \
.with_content(/"name" *: *"my_service"/) \
.with_content(/"enable_tag_override" *: *false/)
Expand All @@ -28,7 +27,6 @@
it {
should contain_file("/etc/consul/service_my_service.json") \
.with_content(/"service" *: *\{/) \
.with_content(/"meta" *: *\{\}/) \
.with_content(/"id" *: *"my_service"/) \
.with_content(/"name" *: *"my_service"/) \
.with_content(/"enable_tag_override" *: *false/)
Expand Down