Skip to content

Commit

Permalink
chore: remove obsolete repo-server unit test (#9559)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
  • Loading branch information
alexmt authored and crenshaw-dev committed Jun 13, 2022
1 parent ad778e8 commit dc8785e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 97 deletions.
46 changes: 0 additions & 46 deletions reposerver/repository/repository_norace_test.go

This file was deleted.

23 changes: 0 additions & 23 deletions reposerver/repository/repository_test.go
Expand Up @@ -369,29 +369,6 @@ func TestGenerateKsonnetManifest(t *testing.T) {
assert.Equal(t, "https://kubernetes.default.svc", res.Server)
}

func TestGenerateHelmChartWithDependencies(t *testing.T) {
service := newService("../..")

cleanup := func() {
_ = os.Remove(filepath.Join("../../util/helm/testdata/helm2-dependency", helmDepUpMarkerFile))
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/helm2-dependency", "charts"))
}
cleanup()
defer cleanup()

helmRepo := argoappv1.Repository{Name: "bitnami", Type: "helm", Repo: "https://charts.bitnami.com/bitnami"}
q := apiclient.ManifestRequest{
Repo: &argoappv1.Repository{},
ApplicationSource: &argoappv1.ApplicationSource{
Path: "./util/helm/testdata/helm2-dependency",
},
Repos: []*argoappv1.Repository{&helmRepo},
}
res1, err := service.GenerateManifest(context.Background(), &q)
assert.Nil(t, err)
assert.Len(t, res1.Manifests, 10)
}

func TestManifestGenErrorCacheByNumRequests(t *testing.T) {

// Returns the state of the manifest generation cache, by querying the cache for the previously set result
Expand Down
28 changes: 0 additions & 28 deletions util/helm/helm_test.go
@@ -1,8 +1,6 @@
package helm

import (
"fmt"
"os"
"testing"

"github.com/argoproj/argo-cd/v2/util/io/path"
Expand Down Expand Up @@ -103,32 +101,6 @@ func TestHelmGetParamsValueFilesThatExist(t *testing.T) {
assert.Equal(t, slaveCountParam, "3")
}

func TestHelmDependencyBuild(t *testing.T) {
testCases := map[string]string{"Helm": "dependency", "Helm2": "helm2-dependency"}
helmRepos := []HelmRepository{{Name: "bitnami", Repo: "https://charts.bitnami.com/bitnami"}}
for name := range testCases {
t.Run(name, func(t *testing.T) {
chart := testCases[name]
clean := func() {
_ = os.RemoveAll(fmt.Sprintf("./testdata/%s/charts", chart))
_ = os.RemoveAll(fmt.Sprintf("./testdata/%s/Chart.lock", chart))
}
clean()
defer clean()
h, err := NewHelmApp(fmt.Sprintf("./testdata/%s", chart), helmRepos, false, "", "", false)
assert.NoError(t, err)
err = h.Init()
assert.NoError(t, err)
_, err = h.Template(&TemplateOpts{Name: "wordpress"})
assert.Error(t, err)
err = h.DependencyBuild()
assert.NoError(t, err)
_, err = h.Template(&TemplateOpts{Name: "wordpress"})
assert.NoError(t, err)
})
}
}

func TestHelmTemplateReleaseNameOverwrite(t *testing.T) {
h, err := NewHelmApp("./testdata/redis", nil, false, "", "", false)
assert.NoError(t, err)
Expand Down

0 comments on commit dc8785e

Please sign in to comment.