@@ -16,52 +16,95 @@ export SCRIPT_FILE="init.sh"
16
16
# bats test_tags=smoke
17
17
@test " Init, defaults - extension module, workflow" {
18
18
answers=(
19
- " Force Crystal" # name
20
- " force_crystal" # machine_name
21
- " module" # type
22
- " GitHub Actions" # ci_provider
23
- " nothing" # remove init script
24
- " nothing" # proceed with init
19
+ " Force Crystal" # name
20
+ " force_crystal" # machine_name
21
+ " module" # type
22
+ " gha" # ci_provider
23
+ " nothing" # remove init script
24
+ " nothing" # command_wrapper
25
+ " nothing" # proceed with init
25
26
)
26
27
tui_run " ${answers[@]} "
27
28
28
29
assert_output_contains " Please follow the prompts to adjust your extension configuration"
29
30
assert_files_present_common " ${BUILD_DIR} "
30
31
assert_files_present_extension_type_module " ${BUILD_DIR} "
31
- assert_file_not_exists " .circleci/config.yml"
32
+ assert_ci_provider_gha " ${BUILD_DIR} "
33
+ assert_command_wrapper_ahoy " ${BUILD_DIR} "
32
34
assert_output_contains " Initialization complete."
33
35
34
- assert_workflow " ${BUILD_DIR} "
36
+ assert_workflow_run " ${BUILD_DIR} "
35
37
}
36
38
37
- # bats test_tags=smoke
38
39
@test " Init, extension theme, workflow" {
39
40
answers=(
40
- " Force Crystal" # name
41
- " force_crystal" # machine_name
42
- " theme" # type
43
- " GitHub Actions" # ci_provider
44
- " nothing" # remove init script
45
- " nothing" # proceed with init
41
+ " Force Crystal" # name
42
+ " force_crystal" # machine_name
43
+ " theme" # type
44
+ " gha" # ci_provider
45
+ " nothing" # command_wrapper
46
+ " nothing" # remove init script
47
+ " nothing" # proceed with init
46
48
)
47
49
tui_run " ${answers[@]} "
48
50
49
51
assert_output_contains " Please follow the prompts to adjust your extension configuration"
50
52
assert_files_present_common " ${BUILD_DIR} "
51
53
assert_files_present_extension_type_theme " ${BUILD_DIR} "
52
- assert_file_not_exists " .circleci/config.yml"
54
+ assert_ci_provider_gha " ${BUILD_DIR} "
55
+ assert_command_wrapper_ahoy " ${BUILD_DIR} "
53
56
assert_output_contains " Initialization complete."
54
57
55
- assert_workflow " ${BUILD_DIR} "
58
+ assert_workflow_run " ${BUILD_DIR} "
56
59
}
57
60
58
- # bats test_tags=smoke
59
- @test " Init, CircleCI" {
61
+ @test " Init, circleci" {
62
+ answers=(
63
+ " Force Crystal" # name
64
+ " force_crystal" # machine_name
65
+ " module" # type
66
+ " circleci" # ci_provider
67
+ " nothing" # command_wrapper
68
+ " nothing" # remove init script
69
+ " nothing" # proceed with init
70
+ )
71
+ tui_run " ${answers[@]} "
72
+
73
+ assert_output_contains " Please follow the prompts to adjust your extension configuration"
74
+ assert_files_present_common " ${BUILD_DIR} "
75
+ assert_files_present_extension_type_module " ${BUILD_DIR} "
76
+ assert_ci_provider_circleci " ${BUILD_DIR} "
77
+ assert_command_wrapper_ahoy " ${BUILD_DIR} "
78
+ assert_output_contains " Initialization complete."
79
+ }
80
+
81
+ @test " Init, Makefile" {
82
+ answers=(
83
+ " Force Crystal" # name
84
+ " force_crystal" # machine_name
85
+ " module" # type
86
+ " circleci" # ci_provider
87
+ " makefile" # command_wrapper
88
+ " nothing" # remove init script
89
+ " nothing" # proceed with init
90
+ )
91
+ tui_run " ${answers[@]} "
92
+
93
+ assert_output_contains " Please follow the prompts to adjust your extension configuration"
94
+ assert_files_present_common " ${BUILD_DIR} "
95
+ assert_files_present_extension_type_module " ${BUILD_DIR} "
96
+ assert_ci_provider_circleci " ${BUILD_DIR} "
97
+ assert_command_wrapper_makefile " ${BUILD_DIR} "
98
+ assert_output_contains " Initialization complete."
99
+ }
100
+
101
+ @test " Init, no command wrapper" {
60
102
answers=(
61
103
" Force Crystal" # name
62
104
" force_crystal" # machine_name
63
105
" module" # type
64
- " CircleCI" # ci_provider
106
+ " circleci" # ci_provider
107
+ " none" # command_wrapper
65
108
" nothing" # remove init script
66
109
" nothing" # proceed with init
67
110
)
@@ -70,8 +113,8 @@ export SCRIPT_FILE="init.sh"
70
113
assert_output_contains " Please follow the prompts to adjust your extension configuration"
71
114
assert_files_present_common " ${BUILD_DIR} "
72
115
assert_files_present_extension_type_module " ${BUILD_DIR} "
73
- assert_file_exists " .circleci/config.yml "
74
- assert_dir_not_exists " .github/workflows "
116
+ assert_ci_provider_circleci " ${BUILD_DIR} "
117
+ assert_command_wrapper_none " ${BUILD_DIR} "
75
118
assert_output_contains " Initialization complete."
76
119
}
77
120
@@ -80,7 +123,8 @@ export SCRIPT_FILE="init.sh"
80
123
" Force Crystal" # name
81
124
" force_crystal" # machine_name
82
125
" module" # type
83
- " CircleCI" # ci_provider
126
+ " gha" # ci_provider
127
+ " nothing" # command_wrapper
84
128
" n" # remove init script
85
129
" nothing" # proceed with init
86
130
)
@@ -89,6 +133,8 @@ export SCRIPT_FILE="init.sh"
89
133
assert_output_contains " Please follow the prompts to adjust your extension configuration"
90
134
assert_files_present_common " ${BUILD_DIR} "
91
135
assert_files_present_extension_type_module " ${BUILD_DIR} "
136
+ assert_ci_provider_gha " ${BUILD_DIR} "
137
+ assert_command_wrapper_ahoy " ${BUILD_DIR} "
92
138
assert_file_exists " init.sh"
93
139
assert_output_contains " Initialization complete."
94
140
}
@@ -98,7 +144,8 @@ export SCRIPT_FILE="init.sh"
98
144
" Force Crystal" # name
99
145
" force_crystal" # machine_name
100
146
" module" # type
101
- " CircleCI" # ci_provider
147
+ " gha" # ci_provider
148
+ " nothing" # command_wrapper
102
149
" y" # remove init script
103
150
" nothing" # proceed with init
104
151
)
@@ -107,6 +154,8 @@ export SCRIPT_FILE="init.sh"
107
154
assert_output_contains " Please follow the prompts to adjust your extension configuration"
108
155
assert_files_present_common " ${BUILD_DIR} "
109
156
assert_files_present_extension_type_module " ${BUILD_DIR} "
157
+ assert_ci_provider_gha " ${BUILD_DIR} "
158
+ assert_command_wrapper_ahoy " ${BUILD_DIR} "
110
159
assert_file_not_exists " init.sh"
111
160
assert_output_contains " Initialization complete."
112
161
}
0 commit comments