Skip to content

Commit 635fa86

Browse files
committed
Add first ahoy test.
1 parent cfdda1f commit 635fa86

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.github/workflows/scaffold-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup kcov
3535
run: wget https://github.com/SimonKagstrom/kcov/releases/download/v42/kcov-amd64.tar.gz && tar -xf kcov-amd64.tar.gz && sudo mv ./usr/local/bin/kcov /usr/local/bin/kcov && kcov --version
3636

37-
- name: Setup Ahoy v2.1.1
37+
- name: Install Ahoy
3838
run: os=$(uname -s | tr [:upper:] [:lower:]) && architecture=$(case $(uname -m) in x86_64 | amd64) echo "amd64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "amd64" ;; esac) && sudo wget -q https://github.com/ahoy-cli/ahoy/releases/download/v2.1.1/ahoy-bin-$os-$architecture -O /usr/local/bin/ahoy && sudo chown $USER /usr/local/bin/ahoy && chmod +x /usr/local/bin/ahoy
3939

4040
- name: Install dependencies

.scaffold/tests/bats/_assert_init.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ assert_workflow() {
120120

121121
pushd "${dir}" >/dev/null || exit 1
122122

123+
# Very basic workflow.
123124
ahoy build
124125
ahoy lint
125126
ahoy test

.scaffold/tests/bats/ahoy.bats

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bats
2+
3+
load _helper
4+
5+
export BATS_FIXTURE_EXPORT_CODEBASE_ENABLED=1
6+
7+
@test "ahoy build" {
8+
ahoy build
9+
assert_success
10+
assert_output_contains "PROVISION COMPLETE"
11+
12+
run ahoy drush status
13+
assert_success
14+
assert_output_contains "Database : Connected"
15+
assert_output_contains "Drupal bootstrap : Successful"
16+
17+
run ahoy login
18+
assert_success
19+
assert_output_contains "user/reset/1/"
20+
21+
ahoy lint
22+
assert_success
23+
24+
ahoy test
25+
assert_success
26+
27+
ahoy test-unit
28+
assert_success
29+
30+
ahoy test-kernel
31+
assert_success
32+
33+
ahoy test-functional
34+
assert_success
35+
36+
ahoy reset
37+
}

0 commit comments

Comments
 (0)