-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-scripts.yaml
More file actions
129 lines (119 loc) · 3.92 KB
/
test-scripts.yaml
File metadata and controls
129 lines (119 loc) · 3.92 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: "Scripts Feature Test"
columns: 2
logs: true
logsDir: ~/.dpr/logs/test
services:
- id: service-a
name: "Service Alpha"
start: "echo 'Alpha starting...' && sleep 1 && echo 'Alpha ready!' && while true; do echo \"[$(date +%H:%M:%S)] Alpha alive\"; sleep 3; done"
autostart: true
color: green
readyPattern: "Alpha ready!"
scripts:
# Quick script with hotkey
- id: ping
name: "Ping Test"
command: "echo 'Pinging...' && sleep 0.5 && echo 'Pong! Response time: 42ms'"
key: p
# Script that produces multiple lines of output
- id: status
name: "Status Check"
command: |
echo "=== Service Alpha Status ==="
echo "Checking memory..."
sleep 0.3
echo "Memory: OK (256MB used)"
echo "Checking CPU..."
sleep 0.3
echo "CPU: OK (5% usage)"
echo "Checking connections..."
sleep 0.3
echo "Connections: 3 active"
echo "=== All checks passed ==="
key: s
# Longer running script to test "Running..." state
- id: slow-task
name: "Slow Task (3s)"
command: |
echo "Starting slow task..."
for i in 1 2 3; do
echo "Processing step $i of 3..."
sleep 1
done
echo "Slow task complete!"
# Script with lots of output to test scrolling
- id: long-output
name: "Long Output (50 lines)"
command: |
echo "=== Starting Long Output Test ==="
echo ""
for i in $(seq 1 50); do
printf "Line %02d: " $i
echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor."
done
echo ""
echo "=== End of Long Output Test ==="
key: l
- id: service-b
name: "Service Beta"
start: "echo 'Beta starting...' && sleep 1 && echo 'Beta ready!' && while true; do echo \"[$(date +%H:%M:%S)] Beta alive\"; sleep 4; done"
autostart: true
color: blue
readyPattern: "Beta ready!"
scripts:
# Script with a parameter
- id: greet
name: "Greet User"
command: "echo 'Hello, {name}! Welcome to Service Beta.'"
key: g
params:
- id: name
prompt: "Enter your name"
# Script with multiple parameters
- id: send-message
name: "Send Message"
command: |
echo "=== Sending Message ==="
echo "To: {recipient}"
echo "Subject: {subject}"
echo "---"
echo "Message sent successfully!"
key: m
params:
- id: recipient
prompt: "Recipient email"
- id: subject
prompt: "Message subject"
# Script that "fails" (exit code 1)
- id: fail-test
name: "Failure Test"
command: "echo 'This script will fail...' && sleep 0.5 && echo 'Error: Something went wrong!' && exit 1"
key: f
- id: service-c
name: "Service Gamma"
start: "echo 'Gamma starting...' && sleep 1 && echo 'Gamma ready!' && while true; do echo \"[$(date +%H:%M:%S)] Gamma alive\"; sleep 5; done"
autostart: false
color: yellow
readyPattern: "Gamma ready!"
scripts:
# List files script
- id: list-files
name: "List Current Dir"
command: "echo 'Files in current directory:' && ls -la | head -20"
key: l
# Show date/time
- id: datetime
name: "Show Date/Time"
command: "echo 'Current date and time:' && date '+%Y-%m-%d %H:%M:%S %Z'"
key: d
# Environment info
- id: env-info
name: "Environment Info"
command: |
echo "=== Environment Info ==="
echo "User: $USER"
echo "Shell: $SHELL"
echo "PWD: $PWD"
echo "Node: $(node --version 2>/dev/null || echo 'not found')"
echo "NPM: $(npm --version 2>/dev/null || echo 'not found')"
key: e