Skip to content

Commit

Permalink
fix test
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 da27d6d commit 73ffcf1
Showing 1 changed file with 11 additions and 28 deletions.
39 changes: 11 additions & 28 deletions teleport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ test:
pipeline:
- name: Binary checks
runs: |
tctl get roles --format=text
tbot version
tbot --help
tctl version
Expand All @@ -126,7 +125,7 @@ test:
# Create required directories
mkdir -p /tmp/teleport
mkdir -p /tmp/teleport-proxy
mkdir -p /var/lib/teleport
# Create minimal config file for auth server
cat <<-EOF > /tmp/teleport-auth.yaml
Expand All @@ -148,39 +147,23 @@ test:
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
# Initialize auth server with static UUID for tctl
echo "00000000-0000-0000-0000-000000000000" > /var/lib/teleport/host_uuid
chmod 644 /var/lib/teleport/host_uuid
# Start auth server first
# Start auth server
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=$!
# Give auth server time to initialize
sleep 5
# Wait for proxy
wait-for-it 127.0.0.1:3080 -t 30 || (kill $AUTH_PID $PROXY_PID; exit 1)
# Create base64 encoded config for tctl
TCTL_CONFIG=$(base64 /tmp/teleport-auth.yaml)
TELEPORT_CONFIG="$TCTL_CONFIG" tctl get roles --format=text
echo "Basic services test successful!"
kill $AUTH_PID $PROXY_PID
kill $AUTH_PID

0 comments on commit 73ffcf1

Please sign in to comment.