Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Enable metrics acceptance tests (#896)
Browse files Browse the repository at this point in the history
Enable metrics acceptance tests
  • Loading branch information
ndhanushkodi authored and thisisnotashwin committed Apr 15, 2021
1 parent 8bb4db8 commit f96d5e4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
# exit early if any test fails (-failfast only works within a single
# package).
exit_code=0
pkgs=$(go list ./... | grep -v -E 'metrics'| circleci tests split)
pkgs=$(go list ./... | circleci tests split)
echo "Running $pkgs"
for pkg in $pkgs
do
Expand All @@ -143,7 +143,7 @@ jobs:
-kubecontext="kind-dc1" \
-secondary-kubecontext="kind-dc2" \
-debug-directory="$TEST_RESULTS/debug" \
-consul-k8s-image=ishustava/consul-k8s-dev:04-06-2021-8a9a841 # TODO: change once feature-tproxy consul-k8s branch is merged
-consul-k8s-image="gcr.io/nitya-293720/consul-k8s-dev:tproxymetrics2" # TODO: change once feature-tproxy consul-k8s branch is merged
then
echo "Tests in ${pkg} failed, aborting early"
exit_code=1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- deployment.yaml
- service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: static-metrics-app
spec:
selector:
app: static-metrics-app
ports:
- port: 80
targetPort: 9090
2 changes: 1 addition & 1 deletion test/acceptance/tests/metrics/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestAppMetrics(t *testing.T) {

// Deploy service that will emit app and envoy metrics at merged metrics endpoint
logger.Log(t, "creating static-metrics-app")
k8s.Deploy(t, ctx.KubectlOptions(t), cfg.NoCleanupOnFailure, cfg.DebugDirectory, "../fixtures/bases/static-metrics-app/deployment.yaml")
k8s.DeployKustomize(t, ctx.KubectlOptions(t), cfg.NoCleanupOnFailure, cfg.DebugDirectory, "../fixtures/bases/static-metrics-app")

// Create the static-client deployment so we can use it for in-cluster calls to metrics endpoints.
// This simulates queries that would be made by a prometheus server that runs externally to the consul
Expand Down

0 comments on commit f96d5e4

Please sign in to comment.