(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestHostInUseByAnother(t *testing.T) { |
| 66 | ns := &Namespace{name: "test"} |
| 67 | ns.applications = append(ns.applications, |
| 68 | NewApplication(ns, ApplicationSettings{Name: "app1", Host: "shared.localhost"}), |
| 69 | NewApplication(ns, ApplicationSettings{Name: "app2", Host: "unique.localhost"}), |
| 70 | ) |
| 71 | |
| 72 | assert.False(t, ns.HostInUseByAnother("shared.localhost", "app1")) |
| 73 | assert.True(t, ns.HostInUseByAnother("shared.localhost", "app2")) |
| 74 | assert.False(t, ns.HostInUseByAnother("other.localhost", "app1")) |
| 75 | } |
| 76 | |
| 77 | func TestNewApplicationDoesNotAffectNamespace(t *testing.T) { |
| 78 | ns := &Namespace{name: "test"} |
nothing calls this directly
no test coverage detected
searching dependent graphs…