vault/enos/modules/vault_run_blackbox_test
Vault Automation c00eab81a7
Backport Reorganize vault blackbox tests into isolated/scenario/system structure into ce/main (#15705)
* Reorganize vault blackbox tests into isolated/scenario/system structure (#14919)

* Reorganize vault blackbox tests into isolated/scenario/system structure

- Move 38 test files from flat structure to organized directories:
  * isolated/: namespace-scoped, concurrent-safe tests (auth, secrets, plugins, verify)
  * scenario/: state-changing tests (raft, ha)
  * system/: system-level config tests (billing, license)
- Add build tags (isolated, scenario, system) to all test files
- Update enos scenarios to use new test paths (./vault/external_tests/blackbox/isolated/verify)
- Add isolated build tag to undo_logs_test.go for consistency
- Remove empty directories and duplicate test files
- All tests compile successfully with respective build tags

Updated enos scenarios: autopilot, agent, dr-replication, plugin, pr-replication, proxy, seal-ha, smoke, upgrade

* Fix test failures: skip postgres without env vars, handle userpass login failure

* Add HSM-specific build tags for test compilation

* Add metadata path permissions for KV v2 delete/undelete operations

* Fix KV tests: use user session for all write operations

* Fix KV tests: remove userpass, use root session

* Incorporate new AWS and LDAP test functions from main branch

- Add TestAWS_SecretsCreate() and TestAWS_SecretsRead() to isolated/plugins/aws/secrets_aws_test.go
  * Tests basic AWS secrets engine configuration and role creation
  * Tests reading AWS role and root configuration
  * Complements existing TestAWS_GenerateNewUser() with simpler test cases

- Add TestLDAP_StaticRoleCreate(), TestLDAP_LibrarySetRead(), and TestLDAP_LibrarySetDelete() to isolated/plugins/ldap/secrets_ldap_test.go
  * Tests LDAP static role creation for password rotation
  * Tests LDAP library set operations for service account management
  * Tests library set deletion
  * Adds requireLDAPAvailable() helper for connectivity verification
  * Complements existing dynamic credential tests

- All new test functions include:
  * Build tag: //go:build isolated
  * t.Parallel() for concurrent execution
  * Proper environment variable checks with skip logic
  * Consistent error handling and assertions

- Cleanup:
  * Removed stray .git directories from test folders
  * Removed empty vault/external_tests/blackbox/plugins directory

These changes ensure the PR includes all test coverage from main while maintaining
the new isolated/scenario/system organization structure.

* Fix pr-replication scenario to use correct test path and name

- Update test_package from ./vault/external_tests/blackbox/verify to isolated/verify
- Update test_names from TestVaultUIAvailability to TestUIAssets
- Fixes test failures caused by incomplete migration in blackbox test reorganization

* Fix all Enos scenarios: isolated/verify path and correct test names

* Skip isolated tests on CE - require enterprise features

---------

Co-authored-by: hashigator <280075563+hashigator@users.noreply.github.com>
Co-authored-by: hashigator <lt.carbonell@ibm.com>
2026-06-23 11:29:48 -04:00
..
scripts Backport Reorganize vault blackbox tests into isolated/scenario/system structure into ce/main (#15705) 2026-06-23 11:29:48 -04:00
main.tf feat(enos): migrate vault_verify_undo_logs to blackbox tests (#14543) (#14913) 2026-06-02 09:20:04 -04:00
outputs.tf VAULT-43741 (enos) Convert vault_verify_version to Use Blackbox SDK (#13950) (#14323) 2026-04-28 08:59:34 -04:00
plugin.tf (enos): Add LDAP secrets engine blackbox tests to Plugin Scenario (#13072) (#13293) 2026-03-23 14:22:46 +00:00
variables.tf feat(enos): migrate vault_verify_undo_logs to blackbox tests (#14543) (#14913) 2026-06-02 09:20:04 -04:00