@@ -82,7 +82,7 @@ def files_in_repository(git_repo_dir)
82
82
names = names_and_payloads . collect ( &:first )
83
83
payloads = names_and_payloads . collect ( &:second )
84
84
85
- expect ( names . first ) . to ( eq ( "hello_world_local(master): #{ local_repo } / " ) )
85
+ expect ( names . first ) . to ( eq ( "/hello_world_local " ) )
86
86
87
87
expected_hash = {
88
88
"relative_path" => File . dirname ( *repo_dir_structure ) ,
@@ -114,7 +114,7 @@ def files_in_repository(git_repo_dir)
114
114
names = names_and_payloads . collect ( &:first )
115
115
payloads = names_and_payloads . collect ( &:second )
116
116
117
- expect ( names . first ) . to ( eq ( "hello-world(master): #{ nested_repo } /templates " ) )
117
+ expect ( names . first ) . to ( eq ( "templates/ hello-world" ) )
118
118
119
119
expected_hash = {
120
120
"relative_path" => File . dirname ( *nested_repo_structure ) ,
@@ -167,8 +167,8 @@ def files_in_repository(git_repo_dir)
167
167
expect ( names ) . to (
168
168
eq (
169
169
[
170
- "hello-world(master): #{ multiple_templates_repo } /templates " ,
171
- "single-vm(master): #{ multiple_templates_repo } /templates "
170
+ "templates/ hello-world" ,
171
+ "templates/ single-vm"
172
172
]
173
173
)
174
174
)
@@ -213,7 +213,7 @@ def files_in_repository(git_repo_dir)
213
213
names = names_and_payloads . collect ( &:first )
214
214
payloads = names_and_payloads . collect ( &:second )
215
215
216
- expect ( names . first ) . to ( eq ( "hello-world(master): #{ nested_repo } /templates " ) )
216
+ expect ( names . first ) . to ( eq ( "templates/ hello-world" ) )
217
217
218
218
files = JSON . parse ( payloads . first ) [ "files" ]
219
219
@@ -241,15 +241,15 @@ def files_in_repository(git_repo_dir)
241
241
record = build_record
242
242
243
243
names = record . configuration_script_payloads . pluck ( :name )
244
- expect ( names ) . to ( match_array ( [ "hello-world(master): #{ nested_repo } /templates " ] ) )
244
+ expect ( names ) . to ( match_array ( [ "templates/ hello-world" ] ) )
245
245
end
246
246
end
247
247
end
248
248
249
249
describe "#template_name_from_git_repo_url" do
250
- let ( :git_url_branch_path ) { [ "git@example.com:manoj-puthran/sample-scripts.git" , "v2.0" , " terraform/templates/hello-world"] }
251
- let ( :https_url_branch_path ) { [ "https://example.com/manoj-puthran/sample-scripts.git" , "v2.0" , " terraform/templates/hello-world"] }
252
- let ( :expected_result ) { "hello-world(v2.0):example.com/manoj-puthran/sample-scripts/ terraform/templates" }
250
+ let ( :git_url_branch_path ) { [ "git@example.com:manoj-puthran/sample-scripts.git" , "terraform/templates/hello-world" ] }
251
+ let ( :https_url_branch_path ) { [ "https://example.com/manoj-puthran/sample-scripts.git" , "terraform/templates/hello-world" ] }
252
+ let ( :expected_result ) { "terraform/templates/hello-world " }
253
253
254
254
it "supports https urls" do
255
255
expect ( described_class . template_name_from_git_repo_url ( *https_url_branch_path ) ) . to ( eq ( expected_result ) )
@@ -279,7 +279,7 @@ def files_in_repository(git_repo_dir)
279
279
names = names_and_payloads . collect ( &:first )
280
280
payloads = names_and_payloads . collect ( &:second )
281
281
282
- expect ( names . first ) . to ( eq ( "hello_world_local(other_branch): #{ local_repo } / " ) )
282
+ expect ( names . first ) . to ( eq ( "/hello_world_local " ) )
283
283
284
284
expected_hash = {
285
285
"relative_path" => File . dirname ( *repo_dir_structure ) ,
0 commit comments