gistfile1.txt
· 3.6 KiB · Text
Исходник
wgctl test --section destructive --verbose
────────────────────────────────────────────────
wgctl Test Suite
────────────────────────────────────────────────
Destructive (modifying state)
──────────────────────────────────────────────────
❌ add phone peer
Output: => ERROR: ❌ Client already exists: phone-testunit
root@wireguard:/etc/wireguard/wgctl# wgctl rm --name phone-testunit
Are you sure you want to permanently remove 'phone-testunit'? [y/N] y
────────────────────────────────────────────────
Removing client: phone-testunit
────────────────────────────────────────────────
=> INFO: 🔑 🔒 Removed keys for: phone-testunit
=> SUCCESS: ✅ 🔒 Client removed: phone-testunit
root@wireguard:/etc/wireguard/wgctl# wgctl test --section destructive --verbose
────────────────────────────────────────────────
wgctl Test Suite
────────────────────────────────────────────────
Destructive (modifying state)
──────────────────────────────────────────────────
✅ add phone peer
✅ block peer
✅ list shows blocked
✅ unblock peer
✅ rule assign
✅ rule unassign
❌ group add
Output: => ERROR: ❌ Group already exists: testgroup
root@wireguard:/etc/wireguard/wgctl# wgctl rm --name phone-testunit
Are you sure you want to permanently remove 'phone-testunit'? [y/N] y
────────────────────────────────────────────────
Removing client: phone-testunit
────────────────────────────────────────────────
=> INFO: 🔑 🔒 Removed keys for: phone-testunit
=> SUCCESS: ✅ 🔒 Client removed: phone-testunit
root@wireguard:/etc/wireguard/wgctl# /usr/local/bin/wgctl group unblock --name testgroup 2>&1
root@wireguard:/etc/wireguard/wgctl# /usr/local/bin/wgctl group rm --name testgroup 2>&1
Remove group 'testgroup'? This only removes the group definition, not the peers. [y/N] y
=> SUCCESS: ✅ 🔒 Group removed: testgroup
root@wireguard:/etc/wireguard/wgctl# wgctl test --section destructive --verbose
────────────────────────────────────────────────
wgctl Test Suite
────────────────────────────────────────────────
Destructive (modifying state)
──────────────────────────────────────────────────
✅ add phone peer
✅ block peer
✅ list shows blocked
✅ unblock peer
✅ rule assign
✅ rule unassign
✅ group add
✅ group peer add
❌ group block (expected 'Blocked' in output)
root@wireguard:/etc/wireguard/wgctl#
| 1 | wgctl test --section destructive --verbose |
| 2 | |
| 3 | ──────────────────────────────────────────────── |
| 4 | wgctl Test Suite |
| 5 | ──────────────────────────────────────────────── |
| 6 | |
| 7 | Destructive (modifying state) |
| 8 | ────────────────────────────────────────────────── |
| 9 | ❌ add phone peer |
| 10 | Output: => ERROR: ❌ Client already exists: phone-testunit |
| 11 | root@wireguard:/etc/wireguard/wgctl# wgctl rm --name phone-testunit |
| 12 | Are you sure you want to permanently remove 'phone-testunit'? [y/N] y |
| 13 | |
| 14 | ──────────────────────────────────────────────── |
| 15 | Removing client: phone-testunit |
| 16 | ──────────────────────────────────────────────── |
| 17 | => INFO: 🔑 🔒 Removed keys for: phone-testunit |
| 18 | => SUCCESS: ✅ 🔒 Client removed: phone-testunit |
| 19 | root@wireguard:/etc/wireguard/wgctl# wgctl test --section destructive --verbose |
| 20 | |
| 21 | ──────────────────────────────────────────────── |
| 22 | wgctl Test Suite |
| 23 | ──────────────────────────────────────────────── |
| 24 | |
| 25 | Destructive (modifying state) |
| 26 | ────────────────────────────────────────────────── |
| 27 | ✅ add phone peer |
| 28 | ✅ block peer |
| 29 | ✅ list shows blocked |
| 30 | ✅ unblock peer |
| 31 | ✅ rule assign |
| 32 | ✅ rule unassign |
| 33 | ❌ group add |
| 34 | Output: => ERROR: ❌ Group already exists: testgroup |
| 35 | root@wireguard:/etc/wireguard/wgctl# wgctl rm --name phone-testunit |
| 36 | Are you sure you want to permanently remove 'phone-testunit'? [y/N] y |
| 37 | |
| 38 | ──────────────────────────────────────────────── |
| 39 | Removing client: phone-testunit |
| 40 | ──────────────────────────────────────────────── |
| 41 | => INFO: 🔑 🔒 Removed keys for: phone-testunit |
| 42 | => SUCCESS: ✅ 🔒 Client removed: phone-testunit |
| 43 | root@wireguard:/etc/wireguard/wgctl# /usr/local/bin/wgctl group unblock --name testgroup 2>&1 |
| 44 | root@wireguard:/etc/wireguard/wgctl# /usr/local/bin/wgctl group rm --name testgroup 2>&1 |
| 45 | Remove group 'testgroup'? This only removes the group definition, not the peers. [y/N] y |
| 46 | => SUCCESS: ✅ 🔒 Group removed: testgroup |
| 47 | root@wireguard:/etc/wireguard/wgctl# wgctl test --section destructive --verbose |
| 48 | |
| 49 | ──────────────────────────────────────────────── |
| 50 | wgctl Test Suite |
| 51 | ──────────────────────────────────────────────── |
| 52 | |
| 53 | Destructive (modifying state) |
| 54 | ────────────────────────────────────────────────── |
| 55 | ✅ add phone peer |
| 56 | ✅ block peer |
| 57 | ✅ list shows blocked |
| 58 | ✅ unblock peer |
| 59 | ✅ rule assign |
| 60 | ✅ rule unassign |
| 61 | ✅ group add |
| 62 | ✅ group peer add |
| 63 | ❌ group block (expected 'Blocked' in output) |
| 64 | root@wireguard:/etc/wireguard/wgctl# |