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
10 changes: 10 additions & 0 deletions .github/workflows/conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
run: |
go install sigs.k8s.io/[email protected]

- name: Install Helm
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

conformance-test:
needs:
- prepare
Expand Down Expand Up @@ -81,6 +87,10 @@ jobs:
run: |
make kind-load-images

- name: Install API7EE3
run: |
make download-api7ee3-chart

- name: Run Conformance Test
shell: bash
env:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
run: |
go install sigs.k8s.io/[email protected]

- name: Install Helm
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

e2e-test:
needs:
- prepare
Expand Down Expand Up @@ -72,6 +78,10 @@ jobs:
run: |
make install

- name: Download API7EE3 Chart
run: |
make download-api7ee3-chart

- name: Loading Docker Image to Kind Cluster
run: |
make kind-load-images
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ api7-ingress-controller-conformance-report.yaml
*.mdx
.cursor/
.env

charts/api7ee3
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ e2e-test:
@kind get kubeconfig --name $(KIND_NAME) > $$KUBECONFIG
DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test ./test/e2e/ -test.timeout=$(TEST_TIMEOUT) -v -ginkgo.v -ginkgo.focus="$(TEST_FOCUS)"

.PHONY: download-api7ee3-chart
download-api7ee3-chart:
@helm repo add api7 https://charts.api7.ai || true
@helm repo update
@helm pull api7/api7ee3 --destination "$(shell helm env HELM_REPOSITORY_CACHE)"
@echo "Downloaded API7EE3 chart"

.PHONY: conformance-test
conformance-test:
DASHBOARD_VERSION=$(DASHBOARD_VERSION) go test -v ./test/conformance -tags=conformance
Expand Down
14 changes: 5 additions & 9 deletions test/e2e/framework/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"golang.org/x/net/html"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chart/loader"

"helm.sh/helm/v3/pkg/cli"

"helm.sh/helm/v3/pkg/kube"
"k8s.io/apimachinery/pkg/util/yaml"
)
Expand Down Expand Up @@ -273,20 +273,16 @@ func (f *Framework) deploy() {
)
f.GomegaT.Expect(err).ShouldNot(HaveOccurred(), "init helm action config")

chartPathOptions := action.ChartPathOptions{
RepoURL: "https://charts.api7.ai",
}
install := action.NewInstall(actionConfig)
install.Namespace = f.kubectlOpts.Namespace
install.ReleaseName = "api7ee3"

chartPath, err := chartPathOptions.LocateChart("api7ee3", cli.New())
chartPath, err := install.ChartPathOptions.LocateChart("api7/api7ee3", cli.New())
f.GomegaT.Expect(err).ShouldNot(HaveOccurred(), "locate helm chart")

chart, err := loader.Load(chartPath)
f.GomegaT.Expect(err).ShouldNot(HaveOccurred(), "load helm chart")

install := action.NewInstall(actionConfig)
install.Namespace = f.kubectlOpts.Namespace
install.ReleaseName = "api7ee3"

buf := bytes.NewBuffer(nil)
_ = valuesTemplate.Execute(buf, map[string]any{
"DB": _db,
Expand Down
Loading