This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Commit f6f7a93
committed
fix: [#ci] initialize OpenTofu before validation in CI tests
- Add automatic OpenTofu/Terraform initialization in test-unit-config.sh
- Fixes CI workflow failure where 'tofu validate' requires 'tofu init' first
- Check for .terraform directory existence before running validation
- Initialize silently to avoid test output clutter
- Maintains backward compatibility with already-initialized environments
- Resolves GitHub Actions workflow validation errors
This ensures the configuration validation test works correctly in both:
- Local environments (where tofu init has been run manually)
- CI environments (where the working directory is clean)
Tested scenarios:
- Pre-initialized environment (existing behavior preserved)
- Clean environment (auto-initialization works correctly)
- Full CI test suite passes with this fix1 parent 645c589 commit f6f7a93
1 file changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
73 | 91 | | |
74 | 92 | | |
75 | 93 | | |
| |||
0 commit comments