You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been digging around to see if I'm missing something so please feel free to tell me I'm wrong and point me in the right direction.
I've got a recipe that doing the following...
rabbitmq_cluster cluster_nodes do
cluster_name cluster_name
action :set_cluster_name
end
Everything works just fine when we run this on our chef clients. My spec test, which is using
set_cluster_name name to verify that all is well gets an error because my rabbitmq_cluster actions don't include specify :change_cluster_node_type.
The matcher code contains the following...
def set_cluster_name(resource_name) # rubocop:disable AccessorMethodName
ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_cluster, :change_cluster_node_type, resource_name)
end
Why would :change_cluster_node_type be what the set_cluster_name matcher is looking for? Is that a cut-n-paste error?
Thanks much,
Ken
The text was updated successfully, but these errors were encountered:
Update: I modified my local copy of the matcher function to be the following and it worked fine. Is this the correct fix or is there something else going on that I'm missing?
def set_cluster_name(resource_name) # rubocop:disable AccessorMethodName
ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_cluster, :set_cluster_name, resource_name)
end
I've been digging around to see if I'm missing something so please feel free to tell me I'm wrong and point me in the right direction.
I've got a recipe that doing the following...
rabbitmq_cluster cluster_nodes do
cluster_name cluster_name
action :set_cluster_name
end
Everything works just fine when we run this on our chef clients. My spec test, which is using
set_cluster_name name to verify that all is well gets an error because my rabbitmq_cluster actions don't include specify :change_cluster_node_type.
The matcher code contains the following...
def set_cluster_name(resource_name) # rubocop:disable AccessorMethodName
ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_cluster, :change_cluster_node_type, resource_name)
end
Why would :change_cluster_node_type be what the set_cluster_name matcher is looking for? Is that a cut-n-paste error?
Thanks much,
Ken
The text was updated successfully, but these errors were encountered: