Skip to content

Commit

Permalink
Expand functional test coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Mark McCormick <[email protected]>
  • Loading branch information
mamccorm committed Nov 26, 2024
1 parent 49a0107 commit 781b18d
Showing 1 changed file with 67 additions and 1 deletion.
68 changes: 67 additions & 1 deletion teleport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ test:
packages:
- wait-for-it
pipeline:
- runs: |
- name: Binary checks
runs: |
teleport configure -o file
teleport start -c /etc/teleport.yaml &
wait-for-it localhost:3080 -t 10
Expand All @@ -122,3 +123,68 @@ test:
teleport --help
tsh version
tsh --help
- name: Functionality test
runs: |
#!/bin/bash
set -e
# Create required directories
mkdir -p /tmp/teleport
mkdir -p /tmp/teleport-proxy
# Create minimal config file for auth server
cat <<-EOF > /tmp/teleport-auth.yaml
version: v3
teleport:
data_dir: /tmp/teleport
log:
output: stderr
severity: DEBUG
auth_service:
enabled: "yes"
cluster_name: "test-cluster"
listen_addr: 127.0.0.1:3025
tokens:
- "proxy,node:test123"
proxy_service:
enabled: "no"
ssh_service:
enabled: "no"
EOF
# Create config for proxy
cat <<-EOF > /tmp/teleport-proxy.yaml
version: v3
teleport:
data_dir: /tmp/teleport-proxy
auth_token: "test123"
auth_server: "127.0.0.1:3025" # Changed from auth_servers array
log:
output: stderr
severity: DEBUG
auth_service:
enabled: "no"
proxy_service:
enabled: "yes"
listen_addr: 127.0.0.1:3023
web_listen_addr: 127.0.0.1:3080
ssh_service:
enabled: "no"
EOF
# Start auth server first
teleport start --config=/tmp/teleport-auth.yaml --roles=auth &
AUTH_PID=$!
# Wait for auth server
wait-for-it 127.0.0.1:3025 -t 30 || (kill $AUTH_PID; exit 1)
# Start proxy with auth token
teleport start --config=/tmp/teleport-proxy.yaml --roles=proxy &
PROXY_PID=$!
# Wait for proxy
wait-for-it 127.0.0.1:3080 -t 30 || (kill $AUTH_PID $PROXY_PID; exit 1)
echo "Basic services test successful!"
kill $AUTH_PID $PROXY_PID

0 comments on commit 781b18d

Please sign in to comment.