prole/tests/etc/test_prole_auth_keytab_bootstrap_manifest.sh
chrisfu 4ee2b259c9 Checkpoint: rename installer to knoe + harden db build context
- Add build-context helper to copy Docker context safely (ignore runtime data, keep symlinks)

- Update UI and core actions to use ~/.prole/build and shared copy helper

- Add/adjust tests and scripts; introduce knoe ops helpers and update manifests

Co-authored-by: Junie <junie@jetbrains.com>
2026-03-22 01:45:21 -07:00

43 lines
1.2 KiB
Bash

#!/usr/bin/env bash
# Regression test: prole-auth manifest should not hard-require the `prole-auth-keytab`
# secret and should include a keytab bootstrap initContainer.
set -euo pipefail
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
PROLE_HOME=$(cd "$SCRIPT_DIR/../.." && pwd)
MANIFEST="$PROLE_HOME/deploy/opentofu/k3s/manifests/prole/prole-auth-deployment.yaml"
if [[ ! -f "$MANIFEST" ]]; then
echo "FAILURE: manifest not found: $MANIFEST" >&2
exit 1
fi
if ! grep -q "^[[:space:]]*initContainers:" "$MANIFEST"; then
echo "FAILURE: expected initContainers in prole-auth deployment" >&2
exit 1
fi
if ! grep -q "^[[:space:]]*- name: keytab-bootstrap" "$MANIFEST"; then
echo "FAILURE: expected initContainer named keytab-bootstrap" >&2
exit 1
fi
if ! grep -Fq "secretName: prole-auth-keytab" "$MANIFEST"; then
echo "FAILURE: expected reference to secretName prole-auth-keytab (optional)" >&2
exit 1
fi
if ! grep -Fq "optional: true" "$MANIFEST"; then
echo "FAILURE: expected prole-auth-keytab secret to be optional" >&2
exit 1
fi
if ! grep -Fq "emptyDir: {}" "$MANIFEST"; then
echo "FAILURE: expected keytab volume to be emptyDir" >&2
exit 1
fi
echo "SUCCESS"