Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Oct 9, 2023
1 parent 84aa3a2 commit bf66417
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: e2e-tests


on: pull_request
on:
pull_request:
push:
branches: [ main ]

env:
# Make sure to exit early if cache segment download times out after 2 minutes.
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ chlog-update: chlog-validate ## Creates an update to CHANGELOG.md for a release
$(CHLOGGEN) update --version "[$(VERSION)] - $$(date +'%Y-%m-%d')" || exit 1; \
ci_scripts/chloggen-update.sh || exit 1

CERTMANAGER_VERSION ?= 1.10.0
CERTMANAGER_VERSION ?= $(shell yq eval ".dependencies[] | select(.name == \"cert-manager\") | .version" helm-charts/splunk-otel-collector/Chart.yaml)

.PHONY: cert-manager
cert-manager: cmctl
# Consider using cmctl to install the cert-manager once install command is not experimental
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v${CERTMANAGER_VERSION}/cert-manager.yaml
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/${CERTMANAGER_VERSION}/cert-manager.yaml
$(CMCTL) check api --wait=5m

PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
Expand All @@ -114,7 +114,7 @@ cmctl:
exit 0; \
fi ;\
TMP_DIR=$$(mktemp -d) ;\
curl -L -o $$TMP_DIR/cmctl.tar.gz https://github.com/jetstack/cert-manager/releases/download/v$(CERTMANAGER_VERSION)/cmctl-`go env GOOS`-`go env GOARCH`.tar.gz ;\
curl -L -o $$TMP_DIR/cmctl.tar.gz https://github.com/jetstack/cert-manager/releases/download/$(CERTMANAGER_VERSION)/cmctl-`go env GOOS`-`go env GOARCH`.tar.gz ;\
tar xzf $$TMP_DIR/cmctl.tar.gz -C $$TMP_DIR ;\
[ -d bin ] || mkdir bin ;\
mv $$TMP_DIR/cmctl $(CMCTL) ;\
Expand Down
5 changes: 0 additions & 5 deletions e2e_tests/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ func Test_E2E(t *testing.T) {

latestTrace := tracesConsumer.AllTraces()[len(tracesConsumer.AllTraces())-1]
actualSpan := latestTrace.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0)
host, _ := actualSpan.Attributes().Get("http.host")
assert.Equal(t, "localhost:3000", host.AsString())

statusCode, _ := actualSpan.Attributes().Get("http.status_code")
assert.Equal(t, "200", statusCode.AsString())

expectedSpan := expectedTraces.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0)
expectedSpan.Attributes().Range(func(k string, _ pcommon.Value) bool {
Expand Down

0 comments on commit bf66417

Please sign in to comment.