Backport Remove go-licensing specific changes from CE into ce/main (#11922)

* no-op commit

* merging changes from ent

* deleting ent file

* moving licensing config back

* Revert "moving licensing config back"

This reverts commit 8856cd7d5d334355610782e500ebcd4438ff89b3.

* adding back licensing config to original state (#11925)

---------

Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
Co-authored-by: akshya96 <araghavan@hashicorp.com>
This commit is contained in:
Vault Automation 2026-01-22 20:30:31 -08:00 committed by GitHub
parent bb75e0846a
commit 8d3e25015f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 8 deletions

View file

@ -11,7 +11,6 @@ import (
"io"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-licensing/v4"
"github.com/hashicorp/vault/helper/activationflags"
"github.com/hashicorp/vault/helper/namespace"
"github.com/hashicorp/vault/limits"
@ -39,7 +38,6 @@ func (e entCoreConfig) Clone() entCoreConfig {
type LicensingConfig struct {
AdditionalPublicKeys []interface{}
IssuerOptions licensing.IssuerOptions
}
func coreInit(c *Core, conf *CoreConfig) error {

View file

@ -1974,11 +1974,12 @@ func (testCluster *TestCluster) newCore(t testing.TB, idx int, coreConfig *CoreC
localConfig.Seal.SetCore(c)
}
// Ent specific test config for licensing
// Set test public keys in the core for tests that call license reloads
c.testSetTestPubKeys(localConfig.LicensingConfig.AdditionalPublicKeys)
c.testSetTestPubKeys(localConfig)
// Set test license issuer options in the core for tests that call license reloads
c.testSetTestIssuerOptions(localConfig.LicensingConfig.IssuerOptions)
c.testSetTestIssuerOptions(localConfig)
return cleanupFunc, c, localConfig, handler
}

View file

@ -8,8 +8,6 @@ package vault
import (
"crypto/ed25519"
"testing"
"github.com/hashicorp/go-licensing/v4"
)
//go:generate go run github.com/hashicorp/vault/tools/stubmaker
@ -28,5 +26,7 @@ func (c *TestClusterCore) StopPkiCertificateCountConsumerJob() {}
func (c *TestClusterCore) ResetPkiCertificateCounts() {}
func (c *TestClusterCore) RequirePkiCertificateCounts(t testing.TB, expectedIssuedCount, expectedStoredCount int) {
}
func (c *Core) testSetTestPubKeys(additionalKeys []interface{}) {}
func (c *Core) testSetTestIssuerOptions(testIssuerOpts licensing.IssuerOptions) {}
// Ent specific test config for licensing
func (c *Core) testSetTestPubKeys(config CoreConfig) {}
func (c *Core) testSetTestIssuerOptions(config CoreConfig) {}