fix: update JSON fields from snake_case to camelCase and make tests quiet by default

- Update all JSON field references in tests from snake_case to camelCase
- Update vault list JSON output to use currentVault instead of current_vault
- Make integration tests quiet by default unless run with -v flag
- Fix tests that were using exec.Command to use in-process execution helpers
- Tests now only show debug output when explicitly requested or on failure
This commit is contained in:
2025-07-15 07:35:48 +02:00
parent f9938135c6
commit 7c5e78db17
3 changed files with 42 additions and 53 deletions

View File

@@ -357,9 +357,9 @@ Passphrase: ` + testPassphrase + `
var metadata struct {
ID string `json:"id"`
Type string `json:"type"`
CreatedAt time.Time `json:"created_at"`
CreatedAt time.Time `json:"createdAt"`
Flags []string `json:"flags"`
GPGKeyID string `json:"gpg_key_id"`
GPGKeyID string `json:"gpgKeyId"`
}
if err := json.Unmarshal(metadataBytes, &metadata); err != nil {
@@ -396,7 +396,7 @@ Passphrase: ` + testPassphrase + `
// Create PGP metadata with GPG key ID
type PGPUnlockerMetadata struct {
secret.UnlockerMetadata
GPGKeyID string `json:"gpg_key_id"`
GPGKeyID string `json:"gpgKeyId"`
}
pgpMetadata := PGPUnlockerMetadata{