Skip to content

Commit

Permalink
go rewrite - sort context map in test file (GoogleCloudPlatform#10975)
Browse files Browse the repository at this point in the history
  • Loading branch information
c2thorn authored Jun 17, 2024
1 parent 82c34ca commit bb3772e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion mmv1/templates/terraform/env_var_context.go.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<% example.test_env_vars&.each do |var_name, var_type| -%>
<% unless example.test_env_vars.nil? -%>
<% example.test_env_vars.sort.each do |var_name, var_type| -%>
<% if var_type == :ORG_ID -%>
"<%= var_name -%>": envvar.GetTestOrgFromEnv(t),
<% elsif var_type == :ORG_DOMAIN -%>
Expand Down Expand Up @@ -29,3 +30,4 @@
"<%= var_name -%>": envvar.GetTestZoneFromEnv(),
<% end -%>
<% end -%>
<% end -%>
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestAcc<%= test_slug -%>(t *testing.T) {
context := map[string]interface{} {
<%= lines(indent(compile(pwd + '/templates/terraform/env_var_context.go.erb'), 4)) -%>
<% unless example.test_vars_overrides.nil? -%>
<% example.test_vars_overrides.each do |var_name, override| -%>
<% example.test_vars_overrides.sort.each do |var_name, override| -%>
"<%= var_name %>": <%= override %>,
<% end -%>
<% end -%>
Expand Down

0 comments on commit bb3772e

Please sign in to comment.