agent: initial web assets

pull/1543/head
Ryan Uber 9 years ago
parent c3e7c98da2
commit 2d7ced22b3

File diff suppressed because one or more lines are too long

@ -34,11 +34,6 @@ func makeHTTPServerWithConfig(t *testing.T, cb func(c *Config)) (string, *HTTPSe
}
dir, agent := makeAgent(t, conf)
uiDir := filepath.Join(dir, "ui")
if err := os.Mkdir(uiDir, 755); err != nil {
t.Fatalf("err: %v", err)
}
conf.UiDir = uiDir
servers, err := NewHTTPServers(agent, conf, agent.logOutput)
if err != nil {
t.Fatalf("err: %v", err)

@ -18,7 +18,17 @@ import (
)
func TestUiIndex(t *testing.T) {
dir, srv := makeHTTPServer(t)
// Make a test dir to serve UI files
uiDir, err := ioutil.TempDir("", "consul")
if err != nil {
t.Fatalf("err: %v", err)
}
defer os.RemoveAll(uiDir)
// Make the server
dir, srv := makeHTTPServerWithConfig(t, func(c *Config) {
c.UiDir = uiDir
})
defer os.RemoveAll(dir)
defer srv.Shutdown()
defer srv.agent.Shutdown()

Loading…
Cancel
Save