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

chore: remove obsolete repo-server unit test #9559

Merged
merged 1 commit into from Jun 1, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
@@ -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