add oss check on tests (#28226)

This commit is contained in:
vinay-gopalan
2024-08-29 13:05:54 -07:00
committed by GitHub
parent 1ab4ed0da3
commit b6015de314
2 changed files with 10 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import (
"testing"
"time"
"github.com/hashicorp/vault/helper/constants"
"github.com/hashicorp/vault/helper/testhelpers/certhelpers"
"github.com/hashicorp/vault/helper/testhelpers/postgresql"
"github.com/hashicorp/vault/sdk/database/dbplugin/v5"
@@ -643,6 +644,10 @@ func TestPostgreSQL_Initialize_CloudGCP(t *testing.T) {
// TestPostgreSQL_Initialize_SelfManaged_OSS tests the initialization of
// the self-managed flow and ensures an error is returned on OSS.
func TestPostgreSQL_Initialize_SelfManaged_OSS(t *testing.T) {
if constants.IsEnterprise {
t.Skip("this test is only valid on OSS")
}
cleanup, url := postgresql.PrepareTestContainerSelfManaged(t)
defer cleanup()
@@ -1136,6 +1141,10 @@ func TestUpdateUser_Password(t *testing.T) {
// TestUpdateUser_SelfManaged_OSS checks basic validation
// for self-managed fields and confirms an error is returned on OSS
func TestUpdateUser_SelfManaged_OSS(t *testing.T) {
if constants.IsEnterprise {
t.Skip("this test is only valid on OSS")
}
// Shared test container for speed - there should not be any overlap between the tests
db, cleanup := getPostgreSQL(t, nil)
defer cleanup()