From 097417cd62d065a79da19060facd3b0937c67d1f Mon Sep 17 00:00:00 2001 From: Vault Automation Date: Fri, 30 Jan 2026 20:52:59 -0500 Subject: [PATCH] Adding ibm license tests for ent files (#11803) (#12114) * adding ibm tests for ent files * changing isHashicorpLicense to isIBMLicense and moving DiagnoseCheckLicenseGeneration to core_util_common.go * reverting non-license related tests * removing hashicorp license test Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com> --- command/operator_diagnose.go | 4 +++- vault/core_util.go | 2 +- vault/core_util_common.go | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/command/operator_diagnose.go b/command/operator_diagnose.go index bdb7d6d240..728a2a01d9 100644 --- a/command/operator_diagnose.go +++ b/command/operator_diagnose.go @@ -652,7 +652,9 @@ SEALFAIL: if envLicense := os.Getenv(EnvVaultLicense); envLicense != "" { coreConfig.License = envLicense } - vault.DiagnoseCheckLicense(licenseCtx, vaultCore, coreConfig, false) + vault.DiagnoseCheckLicense(licenseCtx, vaultCore, coreConfig, vault.DiagnoseCheckLicenseGeneration{ + Generate: false, + }) } licenseSpan.End() diff --git a/vault/core_util.go b/vault/core_util.go index 0e1f1c094d..ea7b444b42 100644 --- a/vault/core_util.go +++ b/vault/core_util.go @@ -207,7 +207,7 @@ func (c *Core) MissingRequiredState(raw []string, perfStandby bool) bool { return false } -func DiagnoseCheckLicense(ctx context.Context, vaultCore *Core, coreConfig CoreConfig, generate bool) (bool, []string) { +func DiagnoseCheckLicense(ctx context.Context, vaultCore *Core, coreConfig CoreConfig, generateInput DiagnoseCheckLicenseGeneration) (bool, []string) { return false, nil } diff --git a/vault/core_util_common.go b/vault/core_util_common.go index bec673280e..d15f51e0f1 100644 --- a/vault/core_util_common.go +++ b/vault/core_util_common.go @@ -11,6 +11,11 @@ import ( "github.com/hashicorp/vault/sdk/logical" ) +type DiagnoseCheckLicenseGeneration struct { + Generate bool + GenerateIBMLicense bool +} + // GetCoreConfigInternal returns the server configuration // in struct format. func (c *Core) GetCoreConfigInternal() *server.Config {