Skip to content

Commit 9e9233d

Browse files
authored
Sync ent test fixes (#10935)
1 parent f944a06 commit 9e9233d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

agent/config/runtime_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5605,6 +5605,7 @@ func TestFullConfig(t *testing.T) {
56055605
"upstreams": [
56065606
{
56075607
"destination_name": "KPtAj2cb",
5608+
"destination_namespace": "` + defaultEntMeta.NamespaceOrEmpty() + `",
56085609
"local_bind_port": 4051,
56095610
"config": {
56105611
"kzRnZOyd": "nUNKoL8H"
@@ -6287,6 +6288,7 @@ func TestFullConfig(t *testing.T) {
62876288
upstreams = [
62886289
{
62896290
destination_name = "KPtAj2cb"
6291+
destination_namespace = "` + defaultEntMeta.NamespaceOrEmpty() + `"
62906292
local_bind_port = 4051
62916293
config {
62926294
kzRnZOyd = "nUNKoL8H"
@@ -6296,6 +6298,7 @@ func TestFullConfig(t *testing.T) {
62966298
destination_type = "prepared_query"
62976299
destination_namespace = "9nakw0td"
62986300
destination_name = "KSd8HsRl"
6301+
destination_namespace = "9nakw0td"
62996302
local_bind_port = 11884
63006303
local_bind_address = "127.24.88.0"
63016304
},

agent/service_manager_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ func TestServiceManager_PersistService_ConfigFiles(t *testing.T) {
542542

543543
// Now register a sidecar proxy via the API.
544544
svcID := "web-sidecar-proxy"
545+
defaultMeta := structs.DefaultEnterpriseMeta()
545546

546547
expectState := &structs.NodeService{
547548
Kind: structs.ServiceKindConnectProxy,
@@ -560,9 +561,10 @@ func TestServiceManager_PersistService_ConfigFiles(t *testing.T) {
560561
},
561562
Upstreams: structs.Upstreams{
562563
{
563-
DestinationType: "service",
564-
DestinationName: "redis",
565-
LocalBindPort: 5000,
564+
DestinationType: "service",
565+
DestinationName: "redis",
566+
DestinationNamespace: defaultMeta.NamespaceOrEmpty(),
567+
LocalBindPort: 5000,
566568
Config: map[string]interface{}{
567569
"protocol": "tcp",
568570
},
@@ -573,7 +575,7 @@ func TestServiceManager_PersistService_ConfigFiles(t *testing.T) {
573575
Passing: 1,
574576
Warning: 1,
575577
},
576-
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
578+
EnterpriseMeta: *defaultMeta,
577579
}
578580

579581
// Now wait until we've re-registered using central config updated data.

0 commit comments

Comments
 (0)