Skip to content

Commit

Permalink
[NET-7571]
Browse files Browse the repository at this point in the history
- updating string
  • Loading branch information
kkavish committed Feb 13, 2024
1 parent 1416f6e commit f48de7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dependency/catalog_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ func (d *CatalogServicesQuery) String() string {
if d.dc != "" {
name = name + "@" + d.dc
}
if d.namespace != "" {
name = name + "@" + d.namespace
}
if d.partition != "" {
name = name + "@" + d.partition
name = name + "@partition=" + d.partition
}
if d.namespace != "" {
name = name + "@ns=" + d.namespace
}

if len(name) == 0 {
Expand Down
8 changes: 4 additions & 4 deletions dependency/catalog_services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,22 @@ func TestCatalogServicesQuery_String(t *testing.T) {
{
"datacenter+namespace",
"?ns=bar@dc1",
"catalog.services(@dc1@bar)",
"catalog.services(@dc1@ns=bar)",
},
{
"datacenter+namespace+partition",
"?partition=foo&ns=bar@dc1",
"catalog.services(@dc1@bar@foo)",
"catalog.services(@dc1@partition=foo@ns=bar)",
},
{
"namespace+partition",
"?partition=foo&ns=bar",
"catalog.services(@bar@foo)",
"catalog.services(@partition=foo@ns=bar)",
},
{
"dc+partition",
"?partition=foo@dc1",
"catalog.services(@dc1@foo)",
"catalog.services(@dc1@partition=foo)",
},
}

Expand Down

0 comments on commit f48de7f

Please sign in to comment.