mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 13:26:07 +00:00
agent: initial web assets
This commit is contained in:
parent
c3e7c98da2
commit
2d7ced22b3
431
command/agent/bindata_assetfs.go
Normal file
431
command/agent/bindata_assetfs.go
Normal file
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…
x
Reference in New Issue
Block a user