Commit graph

8 commits

Author SHA1 Message Date
Harald Hoyer 0dc662865f Update test script to use jq and readarray
- Use jq for JSON credential extraction
- Use readarray with process substitution for elegant key parsing
- Assume modern Bash for readarray support (version 5+)
- Improve array handling for environment variables
- Streamline key extraction and application

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-20 13:56:33 +01:00
Harald Hoyer a3fa6c2e8d Improve test script portability
- Replace #!/bin/bash with #!/usr/bin/env bash for better portability
- This helps ensure scripts run correctly on different systems where bash
  might be located in different paths

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-20 13:19:17 +01:00
Harald Hoyer 9b3ac63c3e Implement JSON credential storage
- Add JSON format for storing Vault credentials
- Update save_credentials function to support both formats
- Save both .json and .txt files for compatibility
- Update test_docker.sh to use jq for reliable JSON parsing
- Improve key extraction for unseal operations
- Update .gitignore to exclude JSON credentials

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-20 13:16:39 +01:00
Harald Hoyer 98384791c3 Improve Vault status detection in test script
- Use better pattern matching to extract sealed status
- Add more verbose logging of seal status
- Make status checks more resilient to formatting differences
- Ensure test correctly interprets Vault status output

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-20 12:58:09 +01:00
Harald Hoyer d27bd8c57a Enhance Docker test script for more reliable Vault testing
- Use direct Vault commands for unsealing
- Improve key extraction and handling
- Clarify test messages to match expected state
- Fix array handling and proper Bash syntax

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-20 12:57:24 +01:00
Harald Hoyer 8595cdead3 Use grep for more reliable JSON value detection in test script
- Replace Bash pattern matching with grep for more consistent testing
- Add more explicit comments about detecting sealed/unsealed status
- Improve overall reliability of the test script

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-20 12:55:53 +01:00
Harald Hoyer 334fc50ac7 Fix vault status checks in Docker test script
- Update JSON parsing to handle Vault status response correctly
- Remove redundant status extraction with grep
- Use safer string matching approach with Bash pattern matching

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-20 12:55:09 +01:00
Harald Hoyer f44dcd1f98 Add Docker Compose test script
This script provides comprehensive testing for the vault-hier project with Docker Compose:
- Tests initial setup, initialization, and unsealing
- Verifies credential file generation
- Tests restart scenario and automatic unsealing
- Validates basic Vault operations (login, secrets, etc.)
- Includes proper cleanup and error handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-20 12:52:05 +01:00