Skip to content

Commit 688280b

Browse files
committed
Help journey tests to work on CI
1 parent 1abd761 commit 688280b

File tree

2 files changed

+42
-38
lines changed

2 files changed

+42
-38
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ jobs:
1919
- name: test
2020
env:
2121
CI: true
22-
run: make tests
22+
run: |
23+
apt-get install tree
24+
make tests
2325
- name: doc
2426
run: cargo doc
2527
- name: stress

tests/stateless-journey.sh

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -43,48 +43,50 @@ function repo-with-remotes() {
4343
}
4444

4545
title "Porcelain ${kind}"
46-
(when "running 'organize'"
47-
snapshot="$snapshot/organize"
48-
(with "a mix of repositories"
49-
(sandbox
50-
repo-with-remotes dir/one-origin origin https://example.com/one-origin
51-
repo-with-remotes origin-and-fork origin https://example.com/origin-and-fork fork https://example.com/other/origin-and-fork
52-
repo-with-remotes special-origin special-name https://example.com/special-origin
53-
repo-with-remotes no-origin
54-
(when "running without arguments"
55-
it "succeeds and informs about the operations that it WOULD do" && {
56-
WITH_SNAPSHOT="$snapshot/no-args-success" \
57-
expect_run_sh $SUCCESSFULLY "$exe organize 2>/dev/null"
58-
}
46+
(with_program tree
47+
(when "running 'organize'"
48+
snapshot="$snapshot/organize"
49+
(with "a mix of repositories"
50+
(sandbox
51+
repo-with-remotes dir/one-origin origin https://example.com/one-origin
52+
repo-with-remotes origin-and-fork origin https://example.com/origin-and-fork fork https://example.com/other/origin-and-fork
53+
repo-with-remotes special-origin special-name https://example.com/special-origin
54+
repo-with-remotes no-origin
55+
(when "running without arguments"
56+
it "succeeds and informs about the operations that it WOULD do" && {
57+
WITH_SNAPSHOT="$snapshot/no-args-success" \
58+
expect_run_sh $SUCCESSFULLY "$exe organize 2>/dev/null"
59+
}
5960

60-
it "does not change the directory structure at all" && {
61-
WITH_SNAPSHOT="$snapshot/initial-directory-structure" \
62-
expect_run $SUCCESSFULLY tree -L 2
63-
}
64-
)
61+
it "does not change the directory structure at all" && {
62+
WITH_SNAPSHOT="$snapshot/initial-directory-structure" \
63+
expect_run $SUCCESSFULLY tree -L 2
64+
}
65+
)
6566

66-
(when "running with --execute"
67-
it "succeeds" && {
68-
WITH_SNAPSHOT="$snapshot/execute-success" \
69-
expect_run_sh $SUCCESSFULLY "$exe organize --execute 2>/dev/null"
70-
}
67+
(when "running with --execute"
68+
it "succeeds" && {
69+
WITH_SNAPSHOT="$snapshot/execute-success" \
70+
expect_run_sh $SUCCESSFULLY "$exe organize --execute 2>/dev/null"
71+
}
7172

72-
it "changes the directory structure" && {
73-
WITH_SNAPSHOT="$snapshot/directory-structure-after-organize" \
74-
expect_run $SUCCESSFULLY tree -L 2
75-
}
76-
)
73+
it "changes the directory structure" && {
74+
WITH_SNAPSHOT="$snapshot/directory-structure-after-organize" \
75+
expect_run $SUCCESSFULLY tree -L 2
76+
}
77+
)
7778

78-
(when "running with --execute again"
79-
it "succeeds" && {
80-
WITH_SNAPSHOT="$snapshot/execute-success" \
81-
expect_run_sh $SUCCESSFULLY "$exe organize --execute 2>/dev/null"
82-
}
79+
(when "running with --execute again"
80+
it "succeeds" && {
81+
WITH_SNAPSHOT="$snapshot/execute-success" \
82+
expect_run_sh $SUCCESSFULLY "$exe organize --execute 2>/dev/null"
83+
}
8384

84-
it "does not alter the directory structure as these are already in place" && {
85-
WITH_SNAPSHOT="$snapshot/directory-structure-after-organize" \
86-
expect_run $SUCCESSFULLY tree -L 2
87-
}
85+
it "does not alter the directory structure as these are already in place" && {
86+
WITH_SNAPSHOT="$snapshot/directory-structure-after-organize" \
87+
expect_run $SUCCESSFULLY tree -L 2
88+
}
89+
)
8890
)
8991
)
9092
)

0 commit comments

Comments
 (0)