mirror of https://github.com/status-im/consul.git
integ test: import missing changes from ent (#20187)
This commit is contained in:
parent
326c0ecfbe
commit
cba3b25196
|
@ -12,6 +12,9 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/hashicorp/consul/api"
|
||||
"github.com/hashicorp/consul/proto-public/pbresource"
|
||||
"github.com/hashicorp/consul/sdk/testutil"
|
||||
|
@ -19,8 +22,6 @@ import (
|
|||
libassert "github.com/hashicorp/consul/test/integration/consul-container/libs/assert"
|
||||
"github.com/hashicorp/consul/test/integration/consul-container/libs/utils"
|
||||
"github.com/hashicorp/consul/testing/deployer/topology"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// Asserter is a utility to help in reducing boilerplate in invoking test
|
||||
|
|
|
@ -14,11 +14,12 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/consul/sdk/testutil/retry"
|
||||
"github.com/hashicorp/go-cleanhttp"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/hashicorp/consul/sdk/testutil/retry"
|
||||
|
||||
libcluster "github.com/hashicorp/consul/test/integration/consul-container/libs/cluster"
|
||||
"github.com/hashicorp/consul/test/integration/consul-container/libs/utils"
|
||||
)
|
||||
|
@ -356,6 +357,15 @@ func GetEnvoyOutputWithClient(client *http.Client, addr string, path string, que
|
|||
return string(body), statusCode, nil
|
||||
}
|
||||
|
||||
func ResetEnvoyCounters(client *http.Client, addr string) (int, error) {
|
||||
var u url.URL
|
||||
u.Host = addr
|
||||
u.Scheme = "http"
|
||||
|
||||
res, err := client.Post(fmt.Sprintf("%s/reset_counters", u.String()), "application/json", nil)
|
||||
return res.StatusCode, err
|
||||
}
|
||||
|
||||
// sanitizeResult takes the value returned from config_dump json and cleans it up to remove special characters
|
||||
// e.g public_listener:0.0.0.0:21001 envoy.filters.network.rbac,envoy.filters.network.tcp_proxy
|
||||
// returns [envoy.filters.network.rbac envoy.filters.network.tcp_proxy]
|
||||
|
|
Loading…
Reference in New Issue