oss part of license diagnose test fix (#12234)

* oss part of license diagnose test fix

* cl
This commit is contained in:
Hridoy Roy 2021-08-02 10:50:49 -07:00 committed by GitHub
parent 28f33d2384
commit a3fefdca35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

3
changelog/_2071.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
core (enterprise): Disallow autogenerated licenses to be used in diagnose even when config is specified
```

View File

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

View File

@ -181,6 +181,6 @@ func (c *Core) MissingRequiredState(raw []string, perfStandby bool) bool {
return false
}
func DiagnoseCheckLicense(ctx context.Context, vaultCore *Core, coreConfig CoreConfig) (bool, []string) {
func DiagnoseCheckLicense(ctx context.Context, vaultCore *Core, coreConfig CoreConfig, generate bool) (bool, []string) {
return false, nil
}