File tree 1 file changed +23
-5
lines changed
1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -4,22 +4,40 @@ env GOCOVERDIR=.
4
4
exec go-scaffold test-template --input-file input.yaml --output-directory output
5
5
! stderr .
6
6
7
- cmp output/my-project/my-project.txt expected_file
7
+ cmp output/my-project/my-project.txt expected/my-project.txt
8
+ cmp output/compose.yaml expected/compose.yaml
8
9
9
10
-- input.yaml --
10
- project_name: my-project
11
+ project_name: My Project
12
+ port: 4000
11
13
-- test-template/template.yaml --
12
14
title: My Template
13
15
version: v0.0.1-test
14
16
type: object
15
17
schema:
16
18
project_name:
17
19
type: string
20
+ port:
21
+ type: integer
18
22
required:
19
23
- project_name
20
24
steps:
21
25
- source: ./template
22
- -- test-template/template/{{ project_name }}/{{ project_name }}.txt --
26
+ -- test-template/template/{{ project_name | slugify }}/{{ project_name | slugify }}.txt --
23
27
{{ project_name }}
24
- -- expected_file --
25
- my-project
28
+ -- test-template/template/compose.yaml --
29
+ services:
30
+ backend:
31
+ image: {{ project_name | slugify }}
32
+ build: .
33
+ ports:
34
+ - {{ port }}:4000
35
+ -- expected/my-project.txt --
36
+ My Project
37
+ -- expected/compose.yaml --
38
+ services:
39
+ backend:
40
+ image: my-project
41
+ build: .
42
+ ports:
43
+ - 4000:4000
You can’t perform that action at this time.
0 commit comments