Move files around in preparation for melding into weave code

* library code will go in weave/nameserver/
 * main.go for the server goes in weavedns/ with the containerising
This commit is contained in:
Michael Bridgen committed 2014-10-29 11:34:56 +00:00
1 parent fdcb960cdd
commit 8469fea215
17 files changed

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
package weavedns
import (
"reflect"
"testing"
)
func assertNoErr(t *testing.T, err error) {
if err != nil {
t.Fatal(err)
}
}
func assertStatus(t *testing.T, got int, wanted int, desc string) {
if got != wanted {
t.Fatalf("Expected %s %d but got %d", desc, wanted, got)
}
}
func assertErrorInterface(t *testing.T, got interface{}, wanted interface{}, desc string) {
gotT, wantedT := reflect.TypeOf(got), reflect.TypeOf(wanted).Elem()
if !gotT.Implements(wantedT) {
t.Fatalf("Expected %s but got %s (%s)", wantedT.String(), gotT.String(), desc)
}
}
func assertErrorType(t *testing.T, got interface{}, wanted interface{}, desc string) {
gotT, wantedT := reflect.TypeOf(got), reflect.TypeOf(wanted).Elem()
if gotT != wantedT {
t.Fatalf("Expected %s but got %s (%s)", wantedT.String(), gotT.String(), desc)
}
}