1 parent
de13d851a8
commit
a28362b82c
34 files changed
+1541
-341
No files matched your search
@@ -74,8 +74,8 @@ func TestModePreferenceAndExistingSingleServerUI(t *testing.T) {
|
||||
t.Fatalf("single server configuration was changed: %d, body=%s", w.Code, w.Body.String())
|
||||
}
|
||||
w = panelRequest(t, s, "GET", "/servers", nil, nil)
|
||||
if w.Code != 404 {
|
||||
t.Fatalf("fleet accessible when off: %d", w.Code)
|
||||
if w.Code != http.StatusSeeOther || w.Header().Get("Location") != "/configuration?notice=server-inventory-disabled#multi-server-preference" {
|
||||
t.Fatalf("disabled inventory should explain how to enable it: %d %s", w.Code, w.Header().Get("Location"))
|
||||
}
|
||||
w = panelRequest(t, s, "POST", "/configuration/multi-server", url.Values{"enabled": {"on"}}, nil)
|
||||
if w.Code != 303 || w.Header().Get("Location") != "/servers?notice=servers-enabled" {
|
||||
@@ -93,8 +93,8 @@ func TestModePreferenceAndExistingSingleServerUI(t *testing.T) {
|
||||
t.Fatal("fleet still enabled")
|
||||
}
|
||||
w = panelRequest(t, s, "GET", "/servers", nil, nil)
|
||||
if w.Code != 404 {
|
||||
t.Fatalf("fleet accessible after disable: %d", w.Code)
|
||||
if w.Code != http.StatusSeeOther || w.Header().Get("Location") != "/configuration?notice=server-inventory-disabled#multi-server-preference" {
|
||||
t.Fatalf("disabled inventory must link to configuration: %d %s", w.Code, w.Header().Get("Location"))
|
||||
}
|
||||
s2 := panelWithNodes(t, backend.URL, state)
|
||||
if s2.nodes.Enabled() {
|
||||
|
||||
Reference in new issue
Block a user