Add namespace file with build tag for OSS gateway tests (#16590)
* Add namespace file with build tag for OSS tests * Remove TODO comment
This commit is contained in:
parent
00caa78594
commit
7bd248d432
|
@ -83,10 +83,11 @@ func TestAPIGatewayCreate(t *testing.T) {
|
|||
// Create a client proxy instance with the server as an upstream
|
||||
_, gatewayService := createServices(t, cluster, listenerPortOne)
|
||||
|
||||
//make sure the gateway/route come online
|
||||
//make sure config entries have been properly created
|
||||
checkGatewayConfigEntry(t, client, "api-gateway", "")
|
||||
checkTCPRouteConfigEntry(t, client, "api-gateway-route", "")
|
||||
// make sure the gateway/route come online
|
||||
// make sure config entries have been properly created
|
||||
namespace := getNamespace()
|
||||
checkGatewayConfigEntry(t, client, "api-gateway", namespace)
|
||||
checkTCPRouteConfigEntry(t, client, "api-gateway-route", namespace)
|
||||
|
||||
port, err := gatewayService.GetPort(listenerPortOne)
|
||||
require.NoError(t, err)
|
||||
|
|
|
@ -5,21 +5,19 @@ import (
|
|||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/hashicorp/consul/api"
|
||||
libassert "github.com/hashicorp/consul/test/integration/consul-container/libs/assert"
|
||||
libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster"
|
||||
libservice "github.com/hashicorp/consul/test/integration/consul-container/libs/service"
|
||||
libtopology "github.com/hashicorp/consul/test/integration/consul-container/libs/topology"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func getNamespace() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// randomName generates a random name of n length with the provided
|
||||
// prefix. If prefix is omitted, the then entire name is random char.
|
||||
func randomName(prefix string, n int) string {
|
||||
|
@ -80,7 +78,6 @@ func TestHTTPRouteFlattening(t *testing.T) {
|
|||
},
|
||||
)
|
||||
|
||||
//TODO this should only matter in consul enterprise I believe?
|
||||
namespace := getNamespace()
|
||||
gatewayName := randomName("gw", 16)
|
||||
routeOneName := randomName("route", 16)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
//go:build !consulent
|
||||
// +build !consulent
|
||||
|
||||
package gateways
|
||||
|
||||
func getNamespace() string {
|
||||
return ""
|
||||
}
|
Loading…
Reference in New Issue