diff --git a/helper_test.go b/helper_test.go index 2233e39..18b7755 100644 --- a/helper_test.go +++ b/helper_test.go @@ -11,6 +11,7 @@ import ( "path/filepath" "testing" + rice "github.com/GeertJohan/go.rice" "github.com/prometheus/common/log" "github.com/stretchr/testify/assert" ) @@ -65,6 +66,7 @@ func copyFile(fromPath, toPath string) error { } func setup(t *testing.T) Mock { + box = rice.MustFindBox("static") tempDir, err := ioutil.TempDir(os.TempDir(), "notable-testing") if !assert.Nil(t, err, "Error creating temp dir") { return Mock{} diff --git a/main.go b/main.go index c5471f0..4d61f15 100644 --- a/main.go +++ b/main.go @@ -28,7 +28,7 @@ import ( var booted = time.Now() var db Backend var idx bleve.Index -var box = rice.MustFindBox("static") +var box *rice.Box // Flags var ( @@ -268,5 +268,6 @@ func run(w io.Writer) { func main() { flag.Parse() + box = rice.MustFindBox("static") run(os.Stdout) }