mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Correct the post-unseal meaning of the seal status type (#23022)
* Correct the post-unseal meaning of the seal status type And at the same time add a RecoverySealType to the response which preserves the old meaning. Updated the CLI to display both when relevant. * changelog * no longer needed * Don't need this field either, which fixes unit tests * fix unit tests
This commit is contained in:
@@ -108,6 +108,7 @@ func TestStatusFormat(t *testing.T) {
|
||||
|
||||
expectedOutputString := `Key Value
|
||||
--- -----
|
||||
Seal Type type
|
||||
Recovery Seal Type type
|
||||
Initialized true
|
||||
Sealed true
|
||||
@@ -140,6 +141,7 @@ Warnings [warning]`
|
||||
|
||||
expectedOutputString = `Key Value
|
||||
--- -----
|
||||
Seal Type type
|
||||
Recovery Seal Type type
|
||||
Initialized true
|
||||
Sealed true
|
||||
@@ -167,21 +169,22 @@ func getMockStatusData(emptyFields bool) SealStatusOutput {
|
||||
var sealStatusResponseMock api.SealStatusResponse
|
||||
if !emptyFields {
|
||||
sealStatusResponseMock = api.SealStatusResponse{
|
||||
Type: "type",
|
||||
Initialized: true,
|
||||
Sealed: true,
|
||||
T: 1,
|
||||
N: 2,
|
||||
Progress: 3,
|
||||
Nonce: "nonce",
|
||||
Version: "version",
|
||||
BuildDate: "build date",
|
||||
Migration: true,
|
||||
ClusterName: "cluster name",
|
||||
ClusterID: "cluster id",
|
||||
RecoverySeal: true,
|
||||
StorageType: "storage type",
|
||||
Warnings: []string{"warning"},
|
||||
Type: "type",
|
||||
Initialized: true,
|
||||
Sealed: true,
|
||||
T: 1,
|
||||
N: 2,
|
||||
Progress: 3,
|
||||
Nonce: "nonce",
|
||||
Version: "version",
|
||||
BuildDate: "build date",
|
||||
Migration: true,
|
||||
ClusterName: "cluster name",
|
||||
ClusterID: "cluster id",
|
||||
RecoverySeal: true,
|
||||
RecoverySealType: "type",
|
||||
StorageType: "storage type",
|
||||
Warnings: []string{"warning"},
|
||||
}
|
||||
|
||||
// must initialize this struct without explicit field names due to embedding
|
||||
@@ -200,20 +203,21 @@ func getMockStatusData(emptyFields bool) SealStatusOutput {
|
||||
}
|
||||
} else {
|
||||
sealStatusResponseMock = api.SealStatusResponse{
|
||||
Type: "type",
|
||||
Initialized: true,
|
||||
Sealed: true,
|
||||
T: 1,
|
||||
N: 2,
|
||||
Progress: 3,
|
||||
Nonce: "nonce",
|
||||
Version: "version",
|
||||
BuildDate: "build date",
|
||||
Migration: true,
|
||||
ClusterName: "",
|
||||
ClusterID: "",
|
||||
RecoverySeal: true,
|
||||
StorageType: "",
|
||||
Type: "type",
|
||||
Initialized: true,
|
||||
Sealed: true,
|
||||
T: 1,
|
||||
N: 2,
|
||||
Progress: 3,
|
||||
Nonce: "nonce",
|
||||
Version: "version",
|
||||
BuildDate: "build date",
|
||||
Migration: true,
|
||||
ClusterName: "",
|
||||
ClusterID: "",
|
||||
RecoverySeal: true,
|
||||
StorageType: "",
|
||||
RecoverySealType: "type",
|
||||
}
|
||||
|
||||
// must initialize this struct without explicit field names due to embedding
|
||||
|
||||
Reference in New Issue
Block a user