Commit 463d309
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 <[email protected]>1 parent ae19ef6 commit 463d309
File tree
2 files changed
+13
-6
lines changed- build/integration/features/bootstrap
2 files changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
| 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