-
Notifications
You must be signed in to change notification settings - Fork 0
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
Test unit added for query
method for TemplateFunctions
module
#39
Conversation
end | ||
|
||
it 'renders templates correctly' do | ||
%w[elements.txt more_elements.txt consul_elements.txt more_consul_elements.txt multi_pass.txt query_element.yml].each do |template| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
query_element.yml was added, this one uses the query method to be renderer
@@ -0,0 +1,16 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This query was required to test the method query for TemplateFunctions
@@ -31,3 +31,14 @@ curl \ | |||
-H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" \ | |||
--data $'Aziz! <%= vars[:aziz] %> 🙄\n' \ | |||
http://localhost:8500/v1/kv/templates/elements/aziz | |||
|
|||
curl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We upload a template to use the method query
--data-binary @spec/support/templates/query-test.yml.erb \ | ||
http://localhost:8500/v1/kv/templates/db/db1 | ||
|
||
curl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this curl we create the query on consul
@@ -0,0 +1,5 @@ | |||
configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this template we test the method query for TemplateFunctions
28b88b3
to
3d7fb20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem good. Prior to merging will you point to this branch in your Rails upgrade pr and make sure you can deploy to staging as a way to validate that template rendering is working in that context?
Yes, that's right! @aharpervc |
3d7fb20
to
35eb22b
Compare
Test Plan