@@ -5,114 +5,6 @@ load _helper
5
5
export BATS_FIXTURE_EXPORT_CODEBASE_ENABLED=1
6
6
7
7
# bats file_tags=p1
8
- @test " ahoy build" {
9
- run ahoy build
10
- assert_success
11
- assert_output_contains " PROVISION COMPLETE"
12
- }
13
-
14
- @test " ahoy assemble" {
15
- run ahoy assemble
16
- assert_success
17
-
18
- assert_output_contains " ASSEMBLE COMPLETE"
19
- assert_dir_exists " ${BUILD_DIR} /build/vendor"
20
- assert_file_exists " ${BUILD_DIR} /build/composer.json"
21
- assert_file_exists " ${BUILD_DIR} /build/composer.lock"
22
- assert_dir_exists " ${BUILD_DIR} /node_modules"
23
- assert_output_contains " Would run build"
24
- }
25
-
26
- @test " ahoy assemble - skip NPM build" {
27
- touch " .skip_npm_build"
28
-
29
- run ahoy assemble
30
- assert_success
31
-
32
- assert_output_contains " ASSEMBLE COMPLETE"
33
- assert_dir_exists " ${BUILD_DIR} /build/vendor"
34
- assert_file_exists " ${BUILD_DIR} /build/composer.json"
35
- assert_file_exists " ${BUILD_DIR} /build/composer.lock"
36
- assert_dir_exists " ${BUILD_DIR} /node_modules"
37
- assert_output_not_contains " Would run build"
38
- }
39
-
40
- @test " ahoy start" {
41
- run ahoy start
42
- assert_failure
43
- assert_output_not_contains " ENVIRONMENT READY"
44
-
45
- ahoy assemble
46
- run ahoy start
47
- assert_success
48
-
49
- assert_output_contains " ENVIRONMENT READY"
50
- }
51
-
52
- @test " ahoy stop" {
53
- run ahoy stop
54
- assert_success
55
- assert_output_contains " ENVIRONMENT STOPPED"
56
-
57
- ahoy assemble
58
- ahoy start
59
-
60
- run ahoy stop
61
- assert_success
62
- assert_output_contains " ENVIRONMENT STOPPED"
63
- }
64
-
65
- @test " ahoy build - basic workflow" {
66
- run ahoy build
67
- assert_success
68
- assert_output_contains " PROVISION COMPLETE"
69
-
70
- run ahoy drush status
71
- assert_success
72
- assert_output_contains " Database : Connected"
73
- assert_output_contains " Drupal bootstrap : Successful"
74
-
75
- run ahoy login
76
- assert_success
77
- assert_output_contains " user/reset/1/"
78
-
79
- ahoy lint
80
- assert_success
81
-
82
- ahoy test
83
- assert_success
84
- assert_dir_exists " ${BUILD_DIR} /build/web/sites/simpletest/browser_output"
85
- }
86
-
87
- @test " ahoy lint, lint-fix" {
88
- ahoy assemble
89
- assert_success
90
-
91
- ahoy lint
92
- assert_success
93
-
94
- # shellcheck disable=SC2016
95
- echo ' $a=123;echo $a;' >> your_extension.module
96
- run ahoy lint
97
- assert_failure
98
-
99
- run ahoy lint-fix
100
- run ahoy lint
101
- assert_success
102
- }
103
-
104
- @test " ahoy test unit failure" {
105
- run ahoy assemble
106
- assert_success
107
-
108
- run ahoy test-unit
109
- assert_success
110
-
111
- sed -i -e " s/assertEquals/assertNotEquals/g" " ${BUILD_DIR} /tests/src/Unit/YourExtensionServiceUnitTest.php"
112
- run ahoy test-unit
113
- assert_failure
114
- }
115
-
116
8
@test " ahoy test functional failure" {
117
9
run ahoy build
118
10
assert_success
@@ -127,15 +19,3 @@ export BATS_FIXTURE_EXPORT_CODEBASE_ENABLED=1
127
19
assert_failure
128
20
assert_dir_not_exists " ${BUILD_DIR} /build/web/sites/simpletest/browser_output"
129
21
}
130
-
131
- @test " ahoy test kernel failure" {
132
- run ahoy build
133
- assert_success
134
-
135
- run ahoy test-kernel
136
- assert_success
137
-
138
- sed -i -e " s/assertEquals/assertNotEquals/g" " ${BUILD_DIR} /tests/src/Kernel/YourExtensionServiceKernelTest.php"
139
- run ahoy test-kernel
140
- assert_failure
141
- }
0 commit comments