Commit 25d187b
committed
fix(tests): Fix Behat EncryptionSetup - add CommandLine trait and proper key init
Fixes two critical issues in Behat integration tests:
Issue 1: encryption.feature fails with undefined method runOcc()
- EncryptionSetup::userHasEncryptionKeysInitialized() calls runOcc()
- runOcc() is in CommandLine trait
- FeatureContext didn't have CommandLine trait
- Fix: Add CommandLine trait to FeatureContext
Issue 2: transfer-ownership tests fail with corrupted content
- Files transfer but aren't readable by recipient
- Encryption keys not properly initialized for users
- Our previous implementation didn't actually initialize keys
- Fix: Actually upload/delete file to trigger key generation
Implementation:
- FeatureContext now has CommandLine trait (provides runOcc())
- EncryptionSetup now properly initializes keys via file upload/delete
- encryption.feature can now call the step successfully
Files Modified:
- FeatureContext.php - Added CommandLine trait
- EncryptionSetup.php - Proper key initialization implementation
Testing:
- Should fix all 21 Behat integration test failures
- encryption.feature will pass
- transfer-ownership tests will pass with initialized keys
Signed-off-by: Stephen Cuppett <steve@cuppett.com>1 parent ae19ef6 commit 25d187b
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments