This is an automated email from the ASF dual-hosted git repository. dangogh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git
commit 0e7d855196b26189348fe41fc3bbbc96d19bc9eb Author: Dewayne Richardson <dewr...@apache.org> AuthorDate: Tue Feb 20 11:37:27 2018 -0700 fixed asns test case --- traffic_ops/traffic_ops_golang/asn/asns_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/traffic_ops/traffic_ops_golang/asn/asns_test.go b/traffic_ops/traffic_ops_golang/asn/asns_test.go index 6501a72..85bc948 100644 --- a/traffic_ops/traffic_ops_golang/asn/asns_test.go +++ b/traffic_ops/traffic_ops_golang/asn/asns_test.go @@ -24,6 +24,7 @@ import ( "time" "github.com/apache/incubator-trafficcontrol/lib/go-tc" + "github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth" "github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/test" "github.com/jmoiron/sqlx" @@ -73,13 +74,14 @@ func TestGetASNs(t *testing.T) { mock.ExpectQuery("SELECT").WillReturnRows(rows) v := map[string]string{"dsId": "1"} - servers, errs, errType := getASNs(v, db) + asns, errs, _ := refType.Read(db, v, auth.CurrentUser{}) + if len(errs) > 0 { - t.Errorf("getASNs expected: no errors, actual: %v with type %s", errs, errType.String()) + t.Errorf("asn.Read expected: no errors, actual: %v", errs) } - if len(servers) != 2 { - t.Errorf("getASNs expected: len(servers) == 1, actual: %v", len(servers)) + if len(asns) != 2 { + t.Errorf("asn.Read expected: len(asns) == 2, actual: %v", len(asns)) } } -- To stop receiving notification emails like this one, please contact dang...@apache.org.