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

@@ -10,11 +10,10 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/vault/builtin/logical/pki/issuing" "github.com/hashicorp/vault/builtin/logical/pki/issuing"
"github.com/hashicorp/vault/builtin/logical/pki/pki_backend" "github.com/hashicorp/vault/builtin/logical/pki/pki_backend"
"github.com/hashicorp/vault/sdk/helper/errutil" "github.com/hashicorp/vault/sdk/helper/errutil"
"github.com/hashicorp/vault/sdk/logical"
) )
const ( const (

View File

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