diff --git a/cmd/query/app/fixture/index.html b/cmd/query/app/fixture/index.html
index ea05452e1c4..159ece5a20d 100644
--- a/cmd/query/app/fixture/index.html
+++ b/cmd/query/app/fixture/index.html
@@ -2,4 +2,5 @@
Test Page
+
diff --git a/cmd/query/app/static_handler_test.go b/cmd/query/app/static_handler_test.go
index feb3917ff6e..02b435418fd 100644
--- a/cmd/query/app/static_handler_test.go
+++ b/cmd/query/app/static_handler_test.go
@@ -19,6 +19,7 @@ import (
"io/ioutil"
"net/http"
"net/http/httptest"
+ "strings"
"testing"
"time"
@@ -75,6 +76,17 @@ func TestRegisterRoutesHandler(t *testing.T) {
assert.Equal(t, expectedRespString, respString)
}
+func TestNewStaticAssetsHandlerWithConfig(t *testing.T) {
+ _, err := NewStaticAssetsHandler("fixture", "fixture/invalid-config")
+ assert.Error(t, err)
+
+ handler, err := NewStaticAssetsHandler("fixture", "fixture/ui-config.json")
+ require.NoError(t, err)
+ require.NotNil(t, handler)
+ html := string(handler.indexHTML)
+ assert.True(t, strings.Contains(html, `JAEGER_CONFIG = {"x":"y"};`), "actual: %v", html)
+}
+
func TestLoadUIConfig(t *testing.T) {
type testCase struct {
configFile string