Skip to content

Commit

Permalink
rename e2e -> functional
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Oct 9, 2023
1 parent 3a98cd9 commit 4dc0f42
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 98 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/configs/e2e-kind-config-v1.25.11.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/configs/e2e-kind-config-v1.26.6.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/configs/e2e-kind-config-v1.27.3.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/configs/e2e-kind-config-v1.28.0.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.24.15
kubeadmConfigPatches:
- |
kind: InitConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: e2e-tests
name: functional-tests


on:
Expand All @@ -13,7 +13,7 @@ env:
jobs:
kubernetes-test:
env:
KUBECONFIG: /tmp/kube-config-splunk-otel-collector-chart-e2e-testing
KUBECONFIG: /tmp/kube-config-splunk-otel-collector-chart-functional-testing
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
node_image: kindest/node:${{ matrix.k8s-version }}
kubectl_version: ${{ matrix.k8s-version }}
cluster_name: kind
config: ./.github/workflows/configs/e2e-kind-config-${{ matrix.k8s-version }}.yaml
config: ./.github/workflows/configs/kind-config.yaml
- name: Update dependencies
run: |
make repo-update dep-build
Expand All @@ -54,13 +54,13 @@ jobs:
make cert-manager
- name: Build Node.js docker image
run: |
cd e2e_tests/testdata/nodejs
cd functional_tests/testdata/nodejs
docker build -t nodejs_test:latest .
kind load docker-image nodejs_test:latest --name kind
- name: Fix kubelet TLS server certificates
run: |
kubectl get csr -o=jsonpath='{range.items[?(@.spec.signerName=="kubernetes.io/kubelet-serving")]}{.metadata.name}{" "}{end}' | xargs kubectl certificate approve
- name: run e2e tests
- name: run functional tests
run: |
cd e2e_tests
cd functional_tests
go test -v
15 changes: 9 additions & 6 deletions e2e_tests/e2e_test.go → functional_tests/functional_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package e2e_tests
// Copyright Splunk Inc.
// SPDX-License-Identifier: Apache-2.0

package functional_tests

import (
"context"
Expand Down Expand Up @@ -35,17 +38,17 @@ import (
"k8s.io/client-go/tools/clientcmd"
)

const testKubeConfig = "/tmp/kube-config-splunk-otel-collector-chart-e2e-testing"
const testKubeConfig = "/tmp/kube-config-splunk-otel-collector-chart-functional-testing"

// Test_E2E tests the chart with a real k8s cluster.
// Test_Functions tests the chart with a real k8s cluster.
// Run the following command prior to running the test locally:
//
// export K8S_VERSION=v1.28.0
// kind create cluster --kubeconfig=/tmp/kube-config-splunk-otel-collector-chart-e2e-testing --config=.github/workflows/configs/e2e-kind-config-$K8S_VERSION.yaml
// cd e2e_tests/testdata/nodejs
// kind create cluster --kubeconfig=/tmp/kube-config-splunk-otel-collector-chart-functional-testing --config=.github/workflows/configs/kind-config.yaml --image=kindest/node:$K8S_VERSION
// cd functional_tests/testdata/nodejs
// docker build -t nodejs_test:latest .
// kind load docker-image nodejs_test:latest --name kind
func Test_E2E(t *testing.T) {
func Test_Functions(t *testing.T) {
var expectedTraces ptrace.Traces
expectedTracesFile := filepath.Join("testdata", "expected_traces.yaml")
expectedTraces, err := readTraces(expectedTracesFile)
Expand Down
5 changes: 4 additions & 1 deletion e2e_tests/go.mod → functional_tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module github.com/signalfx/splunk-otel-collector-chart/e2e_tests
// Copyright Splunk Inc.
// SPDX-License-Identifier: Apache-2.0

module github.com/signalfx/splunk-otel-collector-chart/functional_tests

go 1.20

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4dc0f42

Please sign in to comment.