Merge pull request #7142 from leseb/unit-test-ouside-gopath
ceph: do not force go path in unit tests
This commit is contained in:
1 file changed
+2
-3
@@ -18,7 +18,6 @@ limitations under the License.
|
||||
package k8sutil
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
@@ -38,8 +37,8 @@ func TestGetServiceMonitor(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetPrometheusRule(t *testing.T) {
|
||||
gopath := os.Getenv("GOPATH")
|
||||
filePath := path.Join(gopath, "src/github.com/rook/rook/cluster/examples/kubernetes/ceph/monitoring/prometheus-ceph-v14-rules.yaml")
|
||||
projectRoot := util.PathToProjectRoot()
|
||||
filePath := path.Join(projectRoot, "/cluster/examples/kubernetes/ceph/monitoring/prometheus-ceph-v14-rules.yaml")
|
||||
rules, err := GetPrometheusRule(filePath)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, "prometheus-ceph-rules", rules.GetName())
|
||||
|
||||
Reference in new issue
Block a user