Skip to content

Commit

Permalink
[NET-7377]
Browse files Browse the repository at this point in the history
- CT ENT tests for all consul resource supporting partition and ns.
- bug fix for map keys, keys did not contain partition and ns, so could have been overridden if same key in a different ns and partition is added as a dependency.
  • Loading branch information
kkavish committed Feb 18, 2024
1 parent 3793e26 commit 5cf6b6a
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 9 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ linters-settings:
- github.com/hashicorp/consul-template
- github.com/hashicorp/consul/api
- github.com/hashicorp/consul/sdk/testutil
- github.com/hashicorp/consul/proto-public/pbresource
- github.com/hashicorp/go-gatedio
- github.com/hashicorp/go-hclog
- github.com/hashicorp/go-multierror
Expand Down
3 changes: 2 additions & 1 deletion dependency/catalog_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package dependency

import (
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"testing"

"github.com/stretchr/testify/assert"

"github.com/hashicorp/consul/proto-public/pbresource"
)

func TestNewCatalogNodeQuery(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion dependency/catalog_nodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package dependency

import (
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"testing"

"github.com/stretchr/testify/assert"

"github.com/hashicorp/consul/proto-public/pbresource"
)

func TestNewCatalogNodesQuery(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion dependency/catalog_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package dependency

import (
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"testing"

"github.com/stretchr/testify/assert"

"github.com/hashicorp/consul/proto-public/pbresource"
)

func TestNewCatalogServiceQuery(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion dependency/catalog_services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package dependency

import (
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"testing"

"github.com/stretchr/testify/assert"

"github.com/hashicorp/consul/proto-public/pbresource"
)

func TestNewCatalogServicesQuery(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion dependency/dependency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"io"
"log"
"os"
Expand All @@ -19,6 +18,7 @@ import (

"github.com/hashicorp/consul-template/test"
"github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/proto-public/pbresource"
"github.com/hashicorp/consul/sdk/testutil"
nomadapi "github.com/hashicorp/nomad/api"
vapi "github.com/hashicorp/vault/api"
Expand Down
2 changes: 1 addition & 1 deletion dependency/health_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package dependency

import (
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"testing"

"github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/proto-public/pbresource"
"github.com/stretchr/testify/assert"
)

Expand Down
3 changes: 2 additions & 1 deletion dependency/kv_get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ package dependency

import (
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"testing"
"time"

"github.com/stretchr/testify/assert"

"github.com/hashicorp/consul/proto-public/pbresource"
)

func TestNewKVGetQuery(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion dependency/kv_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ package dependency

import (
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"testing"
"time"

"github.com/stretchr/testify/assert"

"github.com/hashicorp/consul/proto-public/pbresource"
)

func TestNewKVKeysQuery(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion dependency/kv_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ package dependency

import (
"fmt"
"github.com/hashicorp/consul/proto-public/pbresource"
"testing"
"time"

"github.com/stretchr/testify/assert"

"github.com/hashicorp/consul/proto-public/pbresource"
)

func TestNewKVListQuery(t *testing.T) {
Expand Down

0 comments on commit 5cf6b6a

Please sign in to comment.