13
13
14
14
issue_url = '' .join (random .choice (string .ascii_letters ) for _ in range (10 ))
15
15
comment_url = '' .join (random .choice (string .ascii_letters ) for _ in range (10 ))
16
+ node_id = '' .join (random .choice (string .ascii_letters ) for _ in range (10 ))
16
17
17
18
def test_path_only ():
18
19
payload = '''Terraform plan in __/test/terraform__
@@ -31,6 +32,7 @@ def test_path_only():
31
32
expected = TerraformComment (
32
33
issue_url = issue_url ,
33
34
comment_url = comment_url ,
35
+ node_id = node_id ,
34
36
status = 'Testing' ,
35
37
headers = {},
36
38
description = 'Terraform plan in __/test/terraform__' ,
@@ -42,6 +44,7 @@ def test_path_only():
42
44
assert _from_api_payload ({
43
45
'body' : payload ,
44
46
'url' : comment_url ,
47
+ 'node_id' : node_id ,
45
48
'issue_url' : issue_url
46
49
}) == expected
47
50
@@ -63,6 +66,7 @@ def test_nondefault_workspace():
63
66
expected = TerraformComment (
64
67
issue_url = issue_url ,
65
68
comment_url = comment_url ,
69
+ node_id = node_id ,
66
70
status = 'Testing' ,
67
71
headers = {},
68
72
description = 'Terraform plan in __/test/terraform__ in the __myworkspace__ workspace' ,
@@ -74,6 +78,7 @@ def test_nondefault_workspace():
74
78
assert _from_api_payload ({
75
79
'body' : payload ,
76
80
'url' : comment_url ,
81
+ 'node_id' : node_id ,
77
82
'issue_url' : issue_url
78
83
}) == expected
79
84
@@ -97,6 +102,7 @@ def test_variables_single_line():
97
102
expected = TerraformComment (
98
103
issue_url = issue_url ,
99
104
comment_url = comment_url ,
105
+ node_id = node_id ,
100
106
status = 'Testing' ,
101
107
headers = {},
102
108
description = 'Terraform plan in __/test/terraform__\n With variables: `var1="value"`' ,
@@ -108,6 +114,7 @@ def test_variables_single_line():
108
114
assert _from_api_payload ({
109
115
'body' : payload ,
110
116
'url' : comment_url ,
117
+ 'node_id' : node_id ,
111
118
'issue_url' : issue_url
112
119
}) == expected
113
120
@@ -136,6 +143,7 @@ def test_variables_multi_line():
136
143
expected = TerraformComment (
137
144
issue_url = issue_url ,
138
145
comment_url = comment_url ,
146
+ node_id = node_id ,
139
147
status = 'Testing' ,
140
148
headers = {},
141
149
description = '''Terraform plan in __/test/terraform__<details><summary>With variables</summary>
@@ -153,6 +161,7 @@ def test_variables_multi_line():
153
161
assert _from_api_payload ({
154
162
'body' : payload ,
155
163
'url' : comment_url ,
164
+ 'node_id' : node_id ,
156
165
'issue_url' : issue_url
157
166
}) == expected
158
167
@@ -175,6 +184,7 @@ def test_var():
175
184
expected = TerraformComment (
176
185
issue_url = issue_url ,
177
186
comment_url = comment_url ,
187
+ node_id = node_id ,
178
188
status = 'Testing' ,
179
189
headers = {},
180
190
description = '''Terraform plan in __/test/terraform__
@@ -187,6 +197,7 @@ def test_var():
187
197
assert _from_api_payload ({
188
198
'body' : payload ,
189
199
'url' : comment_url ,
200
+ 'node_id' : node_id ,
190
201
'issue_url' : issue_url
191
202
}) == expected
192
203
@@ -209,6 +220,7 @@ def test_var_file():
209
220
expected = TerraformComment (
210
221
issue_url = issue_url ,
211
222
comment_url = comment_url ,
223
+ node_id = node_id ,
212
224
status = 'Testing' ,
213
225
headers = {},
214
226
description = '''Terraform plan in __/test/terraform__
@@ -221,6 +233,7 @@ def test_var_file():
221
233
assert _from_api_payload ({
222
234
'body' : payload ,
223
235
'url' : comment_url ,
236
+ 'node_id' : node_id ,
224
237
'issue_url' : issue_url
225
238
}) == expected
226
239
@@ -244,6 +257,7 @@ def test_backend_config():
244
257
expected = TerraformComment (
245
258
issue_url = issue_url ,
246
259
comment_url = comment_url ,
260
+ node_id = node_id ,
247
261
status = 'Testing' ,
248
262
headers = {},
249
263
description = '''Terraform plan in __/test/terraform__
@@ -256,6 +270,7 @@ def test_backend_config():
256
270
assert _from_api_payload ({
257
271
'body' : payload ,
258
272
'url' : comment_url ,
273
+ 'node_id' : node_id ,
259
274
'issue_url' : issue_url
260
275
}) == expected
261
276
@@ -278,6 +293,7 @@ def test_backend_config_bad_words():
278
293
expected = TerraformComment (
279
294
issue_url = issue_url ,
280
295
comment_url = comment_url ,
296
+ node_id = node_id ,
281
297
status = 'Testing' ,
282
298
headers = {},
283
299
description = '''Terraform plan in __/test/terraform__
@@ -290,6 +306,7 @@ def test_backend_config_bad_words():
290
306
assert _from_api_payload ({
291
307
'body' : payload ,
292
308
'url' : comment_url ,
309
+ 'node_id' : node_id ,
293
310
'issue_url' : issue_url
294
311
}) == expected
295
312
@@ -311,6 +328,7 @@ def test_target():
311
328
expected = TerraformComment (
312
329
issue_url = issue_url ,
313
330
comment_url = comment_url ,
331
+ node_id = node_id ,
314
332
status = 'Testing' ,
315
333
headers = {},
316
334
description = '''Terraform plan in __/test/terraform__
@@ -323,6 +341,7 @@ def test_target():
323
341
assert _from_api_payload ({
324
342
'body' : payload ,
325
343
'url' : comment_url ,
344
+ 'node_id' : node_id ,
326
345
'issue_url' : issue_url
327
346
}) == expected
328
347
@@ -344,6 +363,7 @@ def test_replace():
344
363
expected = TerraformComment (
345
364
issue_url = issue_url ,
346
365
comment_url = comment_url ,
366
+ node_id = node_id ,
347
367
status = 'Testing' ,
348
368
headers = {},
349
369
description = '''Terraform plan in __/test/terraform__
@@ -356,6 +376,7 @@ def test_replace():
356
376
assert _from_api_payload ({
357
377
'body' : payload ,
358
378
'url' : comment_url ,
379
+ 'node_id' : node_id ,
359
380
'issue_url' : issue_url
360
381
}) == expected
361
382
@@ -378,6 +399,7 @@ def test_backend_config_file():
378
399
expected = TerraformComment (
379
400
issue_url = issue_url ,
380
401
comment_url = comment_url ,
402
+ node_id = node_id ,
381
403
status = 'Testing' ,
382
404
headers = {},
383
405
description = '''Terraform plan in __/test/terraform__
@@ -390,6 +412,7 @@ def test_backend_config_file():
390
412
assert _from_api_payload ({
391
413
'body' : payload ,
392
414
'url' : comment_url ,
415
+ 'node_id' : node_id ,
393
416
'issue_url' : issue_url
394
417
}) == expected
395
418
@@ -417,6 +440,7 @@ def test_all():
417
440
expected = TerraformComment (
418
441
issue_url = issue_url ,
419
442
comment_url = comment_url ,
443
+ node_id = node_id ,
420
444
status = 'Testing' ,
421
445
headers = {},
422
446
description = '''Terraform plan in __/test/terraform__ in the __test__ workspace
@@ -434,6 +458,7 @@ def test_all():
434
458
assert _from_api_payload ({
435
459
'body' : payload ,
436
460
'url' : comment_url ,
461
+ 'node_id' : node_id ,
437
462
'issue_url' : issue_url
438
463
}) == expected
439
464
@@ -455,6 +480,7 @@ def test_label():
455
480
expected = TerraformComment (
456
481
issue_url = issue_url ,
457
482
comment_url = comment_url ,
483
+ node_id = node_id ,
458
484
status = 'Testing' ,
459
485
headers = {},
460
486
description = '''Terraform plan for __test_label__''' ,
@@ -466,6 +492,7 @@ def test_label():
466
492
assert _from_api_payload ({
467
493
'body' : payload ,
468
494
'url' : comment_url ,
495
+ 'node_id' : node_id ,
469
496
'issue_url' : issue_url
470
497
}) == expected
471
498
@@ -489,6 +516,7 @@ def test_error():
489
516
expected = TerraformComment (
490
517
issue_url = issue_url ,
491
518
comment_url = comment_url ,
519
+ node_id = node_id ,
492
520
status = ':x: Failed to generate plan in [Test terraform-plan #603](https://github.com/dflook/terraform-github-actions/actions/runs/6684032578)' ,
493
521
headers = {},
494
522
description = '''Terraform plan in __tests/workflows/test-plan/error__''' ,
@@ -504,6 +532,7 @@ def test_error():
504
532
assert _from_api_payload ({
505
533
'body' : payload ,
506
534
'url' : comment_url ,
535
+ 'node_id' : node_id ,
507
536
'issue_url' : issue_url
508
537
}) == expected
509
538
@@ -524,6 +553,7 @@ def test_diff():
524
553
expected = TerraformComment (
525
554
issue_url = issue_url ,
526
555
comment_url = comment_url ,
556
+ node_id = node_id ,
527
557
status = 'Testing' ,
528
558
headers = {},
529
559
description = 'Terraform plan in __/test/terraform__ in the __myworkspace__ workspace' ,
@@ -535,5 +565,6 @@ def test_diff():
535
565
assert _from_api_payload ({
536
566
'body' : payload ,
537
567
'url' : comment_url ,
568
+ 'node_id' : node_id ,
538
569
'issue_url' : issue_url
539
570
}) == expected
0 commit comments