Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Remove TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfonso Acosta committed Apr 11, 2019
1 parent 28245c6 commit 2eb3f4c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 20 deletions.
3 changes: 1 addition & 2 deletions cluster/kubernetes/policies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

"github.com/weaveworks/flux"
"github.com/weaveworks/flux/policy"
"github.com/weaveworks/flux/test"
)

func TestUpdatePolicies(t *testing.T) {
Expand Down Expand Up @@ -180,7 +179,7 @@ func TestUpdatePolicies(t *testing.T) {
caseIn := templToString(t, annotationsTemplate, c.in)
caseOut := templToString(t, annotationsTemplate, c.out)
resourceID := flux.MustParseResourceID("default:deployment/nginx")
out, err := (&Manifests{test.ConstNamespacer("default")}).UpdateWorkloadPolicies([]byte(caseIn), resourceID, c.update)
out, err := (&Manifests{ConstNamespacer("default")}).UpdateWorkloadPolicies([]byte(caseIn), resourceID, c.update)
assert.Equal(t, c.wantErr, err != nil, "unexpected error value: %s", err)
if !c.wantErr {
assert.Equal(t, string(out), caseOut)
Expand Down
5 changes: 2 additions & 3 deletions release/releaser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
registryMock "github.com/weaveworks/flux/registry/mock"
"github.com/weaveworks/flux/resource"
"github.com/weaveworks/flux/resourcestore"
"github.com/weaveworks/flux/test"
"github.com/weaveworks/flux/update"
)

Expand Down Expand Up @@ -139,7 +138,7 @@ var (
},
},
}
mockManifests = &kubernetes.Manifests{Namespacer: test.ConstNamespacer("default")}
mockManifests = &kubernetes.Manifests{Namespacer: kubernetes.ConstNamespacer("default")}
)

func mockCluster(running ...cluster.Workload) *cluster.Mock {
Expand Down Expand Up @@ -1085,7 +1084,7 @@ func Test_BadRelease(t *testing.T) {
checkout2, cleanup2 := setup(t)
defer cleanup2()

manifests := &badManifests{Manifests: kubernetes.Manifests{test.ConstNamespacer("default")}}
manifests := &badManifests{Manifests: kubernetes.Manifests{kubernetes.ConstNamespacer("default")}}
ctx = &ReleaseContext{
cluster: mCluster,
resourceStore: NewCheckoutManagerOrFail(t, manifests, checkout2),
Expand Down
1 change: 0 additions & 1 deletion resourcestore/checkoutmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type checkoutManager struct {
policyTranslator cluster.PolicyTranslator
resourceStores []updatableResourceStore
cache *resourceMaps
// TODO(fons): Do we really need locking? Can the checkout be shared across threads?
sync.RWMutex
}

Expand Down
3 changes: 1 addition & 2 deletions resourcestore/configfilemanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/weaveworks/flux/cluster/kubernetes"
"github.com/weaveworks/flux/image"
"github.com/weaveworks/flux/policy"
"github.com/weaveworks/flux/test"
)

const deploymentConfigFile = `---
Expand Down Expand Up @@ -40,7 +39,7 @@ updaters:
`

func TestConfigFileManager(t *testing.T) {
mockManifests := &kubernetes.Manifests{test.ConstNamespacer("default")}
mockManifests := &kubernetes.Manifests{kubernetes.ConstNamespacer("default")}
var cf ConfigFile
err := yaml.Unmarshal([]byte(deploymentConfigFile), &cf)
cf.RootDirectory = os.TempDir()
Expand Down
12 changes: 0 additions & 12 deletions test/common.go

This file was deleted.

0 comments on commit 2eb3f4c

Please sign in to comment.