ui_content_path config option fix (#6601)

* fix ui-content-path config option
This commit is contained in:
Sarah Christoff 2019-10-09 09:14:48 -05:00 committed by GitHub
parent b6499fe6b8
commit 194f5740ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -893,7 +893,7 @@ func (b *Builder) Build() (rt RuntimeConfig, err error) {
TaggedAddresses: c.TaggedAddresses,
TranslateWANAddrs: b.boolVal(c.TranslateWANAddrs),
UIDir: b.stringVal(c.UIDir),
UIContentPath: UIPathBuilder(b.stringVal(b.Flags.Config.UIContentPath)),
UIContentPath: UIPathBuilder(b.stringVal(c.UIContentPath)),
UnixSocketGroup: b.stringVal(c.UnixSocket.Group),
UnixSocketMode: b.stringVal(c.UnixSocket.Mode),
UnixSocketUser: b.stringVal(c.UnixSocket.User),

View File

@ -4049,6 +4049,7 @@ func TestFullConfig(t *testing.T) {
"translate_wan_addrs": true,
"ui": true,
"ui_dir": "11IFzAUn",
"ui_content_path": "consul",
"unix_sockets": {
"group": "8pFodrV8",
"mode": "E8sAwOv4",
@ -4647,6 +4648,7 @@ func TestFullConfig(t *testing.T) {
translate_wan_addrs = true
ui = true
ui_dir = "11IFzAUn"
ui_content_path = "consul"
unix_sockets = {
group = "8pFodrV8"
mode = "E8sAwOv4"
@ -5340,7 +5342,7 @@ func TestFullConfig(t *testing.T) {
"wan": "78.63.37.19",
},
TranslateWANAddrs: true,
UIContentPath: "/ui/",
UIContentPath: "/consul/",
UIDir: "11IFzAUn",
UnixSocketUser: "E0nB1DwA",
UnixSocketGroup: "8pFodrV8",
@ -5964,8 +5966,8 @@ func TestSanitize(t *testing.T) {
"StatsiteAddr": ""
},
"TranslateWANAddrs": false,
"UIContentPath": "",
"UIDir": "",
"UIContentPath": "",
"UnixSocketGroup": "",
"UnixSocketMode": "",
"UnixSocketUser": "",