Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SHELL := /bin/bash

VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS := -X main.version=$(VERSION)

Expand All @@ -23,8 +25,10 @@ cluster-up: ## Create the disposable kind cluster for e2e
cluster-down: ## Delete the e2e kind cluster
go tool kind delete cluster --name $(E2E_CLUSTER)

e2e: ## Run e2e tests against the kind cluster (see cluster-up)
E2E_KUBE_CONTEXT=kind-$(E2E_CLUSTER) go test -tags e2e -count=1 -timeout 10m ./test/e2e/
e2e: ## Run e2e tests against the kind cluster (see cluster-up); log goes to test/e2e/logs/
@mkdir -p test/e2e/logs
set -o pipefail; E2E_KUBE_CONTEXT=kind-$(E2E_CLUSTER) go test -tags e2e -count=1 -timeout 10m -v ./test/e2e/ 2>&1 \
| tee test/e2e/logs/e2e-$$(date +%Y%m%d-%H%M%S).log

clean:
rm -rf bin
3 changes: 3 additions & 0 deletions test/e2e/pods_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package e2e

import (
"context"
"encoding/json"
"fmt"
"os"
"strings"
Expand Down Expand Up @@ -135,6 +136,8 @@ func TestPodWatcherAgainstRealCluster(t *testing.T) {
var mu sync.Mutex
seen := make(map[string]collector.PodInfo)
watcher := collector.NewPodWatcher(clientset, func(p collector.PodInfo) {
observed, _ := json.Marshal(p)
t.Logf("pod observed: %s", observed)
if p.Namespace != ns {
return
}
Expand Down