-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpancake.test.sh
executable file
·54 lines (41 loc) · 1.63 KB
/
pancake.test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
check_status() {
if [ $? -ne 0 ]; then
echo "$1 failed!"
exit 1
fi
}
run_test() {
echo "-----------------------------------------------------------------------"
echo "🧪 Pancake Test Suite: $2..."
echo "Running command: $1" # Add a comment to show which command is running
eval $1
check_status "$2"
echo "-----------------------------------------------------------------------"
}
echo "🧪 Pancake Test Suite: Starting..."
run_test "go build" "Building"
run_test "go install" "Installing"
run_test "pancake version" "Checking version"
# Test to check default file create works.
if [ -e ~/pancake.yml ]; then
echo "pancake.yml exists. Deleting the file..."
rm ~/pancake.yml
check_status "Delete pancake.yml"
echo "pancake.yml deleted successfully."
else
echo "pancake.yml does not exist. No action needed."
fi
run_test "pancake editconfig" "Opening config file for the first time"
run_test "pancake editconfig" "Opening config file for the second time"
run_test "pancake project list" "Listing projects"
run_test "pancake project sync spring-helloworld" "Sync 1 projects"
run_test "pancake project sync" "Sync all projects"
run_test "pancake project open spring-helloworld" "Open 1 projects"
run_test "pancake project open" "Open all projects"
run_test "pancake project build spring-helloworld" "build 1 projects"
run_test "pancake project build" "build all projects"
#run_test "pancake project start spring-helloworld" "Start 1 projects"
#run_test "pancake project start" "Start all projects"
echo "🧪 Pancake Test Suite: End."
export PATH="/Users/unicorn/go/bin:$PATH"