Add a couple of tests for bundle init with custom template (#2293)

These test custom template and what happens if helper function returns
an error.
This commit is contained in:
Denis Bilenko 2025-02-07 14:13:12 +01:00 committed by GitHub
parent 65ac9a336a
commit ecc05689ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Error: failed to compute file content for helpers.txt.tmpl. template: :1:14: executing "" at <user_name>: error calling user_name:
Exit code: 1

View File

@ -0,0 +1 @@
$CLI bundle init .

View File

@ -0,0 +1 @@
user_name: {{ user_name }}

View File

@ -0,0 +1,7 @@
Badness = '''(minor) error message is not great: executing "" at <user_name>: error calling user_name:'''
LocalOnly = true
[[Server]]
Pattern = "GET /api/2.0/preview/scim/v2/Me"
Response.Body = '{}'
Response.StatusCode = 500

View File

@ -0,0 +1,2 @@
✨ Successfully initialized template
user_name: [USERNAME]

View File

@ -0,0 +1,3 @@
$CLI bundle init .
cat helpers.txt
rm helpers.txt

View File

@ -0,0 +1 @@
user_name: {{ user_name }}

View File

@ -0,0 +1 @@
LocalOnly = true