Skip to content

Commit

Permalink
chore: remove obsolete repo-server unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
  • Loading branch information
alexmt committed Jun 1, 2022
1 parent 61f48d5 commit ba30603
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 94 deletions.
47 changes: 0 additions & 47 deletions reposerver/repository/repository_norace_test.go

This file was deleted.

24 changes: 0 additions & 24 deletions reposerver/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,28 +355,6 @@ func TestGenerateJsonnetLibOutside(t *testing.T) {
require.Contains(t, err.Error(), "value file '../../../testdata/jsonnet/vendor' resolved to outside repository root")
}

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

cleanup := func() {
_ = os.Remove(filepath.Join("../../util/helm/testdata/dependency", helmDepUpMarkerFile))
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/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/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 Expand Up @@ -1716,8 +1694,6 @@ func TestFindManifests_Exclude_NothingMatches(t *testing.T) {
[]string{"nginx-deployment", "nginx-deployment-sub"}, []string{objs[0].GetName(), objs[1].GetName()})
}



func Test_findManifests(t *testing.T) {
logCtx := log.WithField("test", "test")
noRecurse := argoappv1.ApplicationSourceDirectory{Recurse: false}
Expand Down
23 changes: 0 additions & 23 deletions util/helm/helm_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package helm

import (
"fmt"
"os"
"testing"

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

func TestHelmDependencyBuild(t *testing.T) {
helmRepos := []HelmRepository{{Name: "bitnami", Repo: "https://charts.bitnami.com/bitnami"}}
chart := "dependency"
clean := func() {
_ = os.RemoveAll("./testdata/dependency/charts")
_ = os.RemoveAll("./testdata/dependency/Chart.lock")
}
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 ba30603

Please sign in to comment.