Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated to not clobber whatever k3d cluster may be running, updated gitea to same version as zarf init #2145

Merged
merged 1 commit into from
Nov 15, 2023
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
2 changes: 1 addition & 1 deletion src/test/external/ext_in_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (suite *ExtInClusterTestSuite) SetupSuite() {
suite.Assertions = require.New(suite.T())

// Install a gitea chart to the k8s cluster to act as the 'remote' git server
giteaChartURL := "https://dl.gitea.io/charts/gitea-5.0.8.tgz"
giteaChartURL := "https://dl.gitea.io/charts/gitea-8.3.0.tgz"
helmInstallArgs := []string{"install", "gitea", giteaChartURL, "-f", "gitea-values.yaml", "-n=git-server", "--create-namespace"}
err := exec.CmdWithPrint("helm", helmInstallArgs...)
suite.NoError(err, "unable to install gitea chart")
Expand Down
7 changes: 4 additions & 3 deletions src/test/external/ext_out_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const (
giteaIP = "172.31.0.99"
giteaHost = "gitea.localhost"
registryHost = "registry.localhost"
clusterName = "zarf-external-test"
)

var outClusterCredentialArgs = []string{
Expand All @@ -42,7 +43,7 @@ func (suite *ExtOutClusterTestSuite) SetupSuite() {
suite.Assertions = require.New(suite.T())

// Teardown any leftovers from previous tests
_ = exec.CmdWithPrint("k3d", "cluster", "delete")
_ = exec.CmdWithPrint("k3d", "cluster", "delete", clusterName)
_ = exec.CmdWithPrint("k3d", "registry", "delete", registryHost)
_ = exec.CmdWithPrint("docker", "network", "remove", network)

Expand All @@ -55,7 +56,7 @@ func (suite *ExtOutClusterTestSuite) SetupSuite() {
suite.NoError(err, "unable to create the k3d registry")

// Create a k3d cluster with the proper networking and aliases
err = exec.CmdWithPrint("k3d", "cluster", "create", "--registry-use", "k3d-"+registryHost+":5000", "--host-alias", giteaIP+":"+giteaHost, "--network", network)
err = exec.CmdWithPrint("k3d", "cluster", "create", clusterName, "--registry-use", "k3d-"+registryHost+":5000", "--host-alias", giteaIP+":"+giteaHost, "--network", network)
suite.NoError(err, "unable to create the k3d cluster")

// Install a gitea server via docker compose to act as the 'remote' git server
Expand All @@ -75,7 +76,7 @@ func (suite *ExtOutClusterTestSuite) SetupSuite() {

func (suite *ExtOutClusterTestSuite) TearDownSuite() {
// Tear down all of that stuff we made for local runs
err := exec.CmdWithPrint("k3d", "cluster", "delete")
err := exec.CmdWithPrint("k3d", "cluster", "delete", clusterName)
suite.NoError(err, "unable to teardown cluster")

err = exec.CmdWithPrint("docker", "compose", "down")
Expand Down
Loading