Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

108 write yaml on interface change #146

Merged
merged 3 commits into from
Mar 10, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update registry test to use new adding format
  • Loading branch information
snagles committed Mar 10, 2018
commit 7c34d1d4cf822184043f33fcff2112899e2b33cd
7 changes: 3 additions & 4 deletions app/models/registry_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package manager

import (
"fmt"
"net/url"
"strconv"
"testing"
Expand All @@ -14,17 +13,17 @@ func TestNewRegistry(t *testing.T) {
baseurl, env := testutils.SetupRegistry(t)
u, _ := url.Parse(baseurl)
port, _ := strconv.Atoi(u.Port())
r, err := NewRegistry(u.Scheme, u.Hostname(), "test", "", "", port, 1*time.Minute, true, true)
err := AllRegistries.AddRegistry(u.Scheme, u.Hostname(), "test", "", "", port, 1*time.Minute, true, true)
if err != nil {
t.Fatalf("Failed to add test registry: %s", err)
}

if tr, ok := AllRegistries.Registries[fmt.Sprintf("%s:%v", r.Host, r.Port)]; ok {
if tr, ok := AllRegistries.Registries["test"]; ok {
if tr.Status() != "UP" {
t.Fatalf("Added registry status not up, reported as: %s", tr.Status())
}
env.Shutdown()
} else {
t.Fatalf("Test registry not found in map of all registries: %s", r.URL)
t.Fatalf("Test registry not found in map of all registries: %s", "test")
}
}