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 909f94a commit 43f8027
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 99 deletions.
47 changes: 0 additions & 47 deletions reposerver/repository/repository_norace_test.go

This file was deleted.

23 changes: 0 additions & 23 deletions reposerver/repository/repository_test.go
Expand Up @@ -374,29 +374,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
30 changes: 1 addition & 29 deletions util/helm/helm_test.go
@@ -1,10 +1,8 @@
package helm

import (
"fmt"
"os"
"path/filepath"
"testing"
"path/filepath"

"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -126,32 +124,6 @@ func TestHelmGetParamsValueFilesThatExist(t *testing.T) {
assert.Equal(t, "3", slaveCountParam)
}

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 43f8027

Please sign in to comment.