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>
This commit is contained in:
Vault Automation 2026-01-30 20:52:59 -05:00 committed by GitHub
parent 38bb6eae78
commit 097417cd62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View file

@ -652,7 +652,9 @@ SEALFAIL:
if envLicense := os.Getenv(EnvVaultLicense); envLicense != "" { if envLicense := os.Getenv(EnvVaultLicense); envLicense != "" {
coreConfig.License = envLicense coreConfig.License = envLicense
} }
vault.DiagnoseCheckLicense(licenseCtx, vaultCore, coreConfig, false) vault.DiagnoseCheckLicense(licenseCtx, vaultCore, coreConfig, vault.DiagnoseCheckLicenseGeneration{
Generate: false,
})
} }
licenseSpan.End() licenseSpan.End()

View file

@ -207,7 +207,7 @@ func (c *Core) MissingRequiredState(raw []string, perfStandby bool) bool {
return false 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 return false, nil
} }

View file

@ -11,6 +11,11 @@ import (
"github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/logical"
) )
type DiagnoseCheckLicenseGeneration struct {
Generate bool
GenerateIBMLicense bool
}
// GetCoreConfigInternal returns the server configuration // GetCoreConfigInternal returns the server configuration
// in struct format. // in struct format.
func (c *Core) GetCoreConfigInternal() *server.Config { func (c *Core) GetCoreConfigInternal() *server.Config {