Skip to content

Commit 561027e

Browse files
committed
Fix broken unit test
1 parent f2e626a commit 561027e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/controller/mongodb/replicaset_controller_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package mongodb
33
import (
44
"context"
55
"encoding/json"
6+
"fmt"
67
"io/ioutil"
78
"os"
8-
"path"
99
"reflect"
1010
"testing"
1111
"time"
@@ -21,7 +21,6 @@ import (
2121

2222
"github.com/mongodb/mongodb-kubernetes-operator/pkg/authentication/scram"
2323
"github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/secret"
24-
e2eutil "github.com/mongodb/mongodb-kubernetes-operator/test/e2e"
2524

2625
"github.com/mongodb/mongodb-kubernetes-operator/pkg/kube/probes"
2726

@@ -657,7 +656,7 @@ func setStatefulSetReadyReplicas(t *testing.T, c k8sClient.Client, mdb mdbv1.Mon
657656

658657
// loadTestFixture will create a MongoDB resource from a given fixture
659658
func loadTestFixture(yamlFileName string) (mdbv1.MongoDBCommunity, error) {
660-
testPath := path.Join(e2eutil.TestdataDir, yamlFileName)
659+
testPath := fmt.Sprintf("testdata/%s", yamlFileName)
661660
mdb := mdbv1.MongoDBCommunity{}
662661
data, err := ioutil.ReadFile(testPath)
663662
if err != nil {

0 commit comments

Comments
 (0)