phase 2: mattes/migrate -> migratex (#848)

* move mattes migrations to migratex

* changes format of migrations to migratex format
* updates test runner to use new interface (double checked this with printlns,
the tests go fully down and then up, and work on pg/mysql)

* remove mattes/migrate

* update tests from deps

* update readme

* fix other file extensions
This commit is contained in:
Reed Allman
2018-03-13 14:12:34 -07:00
committed by GitHub
parent 1f43545b63
commit 4084b727c0
697 changed files with 16924 additions and 35406 deletions

View File

@@ -298,13 +298,12 @@ func TestClientDefaultCollections(t *testing.T) {
for _, tc := range tcs {
// Register views.
for _, v := range DefaultClientViews {
if err := v.Subscribe(); err != nil {
t.Error(err)
}
err := view.Subscribe(DefaultClientViews...)
if err != nil {
t.Error(err)
}
h := &clientStatsHandler{}
h := &ClientHandler{NoTrace: true}
for _, rpc := range tc.rpcs {
mods := []tag.Mutator{}
for _, t := range rpc.tags {
@@ -327,33 +326,29 @@ func TestClientDefaultCollections(t *testing.T) {
}
for _, wantData := range tc.wants {
gotRows, err := wantData.v().RetrieveData()
gotRows, err := view.RetrieveData(wantData.v().Name)
if err != nil {
t.Errorf("%q: RetrieveData(%q) = %v", tc.label, wantData.v().Name(), err)
t.Errorf("%q: RetrieveData(%q) = %v", tc.label, wantData.v().Name, err)
continue
}
for _, gotRow := range gotRows {
if !containsRow(wantData.rows, gotRow) {
t.Errorf("%q: unwanted row for view %q = %v", tc.label, wantData.v().Name(), gotRow)
t.Errorf("%q: unwanted row for view %q = %v", tc.label, wantData.v().Name, gotRow)
break
}
}
for _, wantRow := range wantData.rows {
if !containsRow(gotRows, wantRow) {
t.Errorf("%q: row missing for view %q; want %v", tc.label, wantData.v().Name(), wantRow)
t.Errorf("%q: row missing for view %q; want %v", tc.label, wantData.v().Name, wantRow)
break
}
}
}
// Unregister views to cleanup.
for _, v := range DefaultClientViews {
if err := v.Unsubscribe(); err != nil {
t.Error(err)
}
}
view.Unsubscribe(DefaultClientViews...)
}
}