Skip to content

Commit 9f398e9

Browse files
Merge remote-tracking branch 'remotes/from/ce/main'
2 parents 6da5058 + 3f201ff commit 9f398e9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

vault/external_tests/blackbox/system_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ func TestVaultVersion(t *testing.T) {
3232
t.Logf("Vault version: %v", sealStatus.Data["version"])
3333
}
3434

35+
// TestVaultLicenseStatus verifies Vault license status response
36+
func TestVaultLicenseStatus(t *testing.T) {
37+
v := blackbox.New(t)
38+
39+
// Read the sys/license/status endpoint which should contain license info
40+
licenseStatus := v.MustRead("sys/license/status")
41+
if licenseStatus.Data["autoloaded"] == nil {
42+
t.Fatal("Could not get license details from sys/license/status")
43+
}
44+
autoloaded := licenseStatus.Data["autoloaded"].(map[string]interface{})
45+
if autoloaded["license_id"].(string) == "" {
46+
t.Fatal("Could not retrieve license_id from sys/license/status")
47+
}
48+
}
49+
3550
// TestRaftVoters verifies that all nodes in the raft cluster are voters
3651
func TestRaftVoters(t *testing.T) {
3752
v := blackbox.New(t)

0 commit comments

Comments
 (0)