This is an automated email from the ASF dual-hosted git repository.

dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new d5ddd6c  Fix TO Go ASNs unit tests for renamed symbols
d5ddd6c is described below

commit d5ddd6cf2f6ab3db6f562a1f41b64a5be1b24853
Author: Robert Butts <r...@apache.org>
AuthorDate: Mon May 7 11:21:05 2018 -0600

    Fix TO Go ASNs unit tests for renamed symbols
---
 traffic_ops/traffic_ops_golang/asn/asns_test.go | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/traffic_ops/traffic_ops_golang/asn/asns_test.go 
b/traffic_ops/traffic_ops_golang/asn/asns_test.go
index 6c500ff..ac13975 100644
--- a/traffic_ops/traffic_ops_golang/asn/asns_test.go
+++ b/traffic_ops/traffic_ops_golang/asn/asns_test.go
@@ -34,11 +34,11 @@ import (
        sqlmock "gopkg.in/DATA-DOG/go-sqlmock.v1"
 )
 
-func getTestASNs() []TOASN {
-       ASNs := []TOASN{}
+func getTestASNs() []TOASNV11 {
+       ASNs := []TOASNV11{}
        i := 1
        c := "Yukon"
-       testCase := TOASN{
+       testCase := TOASNV11{
                ASN:          &i,
                Cachegroup:   &c,
                CachegroupID: &i,
@@ -65,7 +65,7 @@ func TestGetASNs(t *testing.T) {
        defer db.Close()
 
        testCase := getTestASNs()
-       cols := test.ColsFromStructByTag("db", TOASN{})
+       cols := test.ColsFromStructByTag("db", TOASNV11{})
        rows := sqlmock.NewRows(cols)
 
        for _, ts := range testCase {
@@ -79,7 +79,7 @@ func TestGetASNs(t *testing.T) {
        mock.ExpectQuery("SELECT").WillReturnRows(rows)
        v := map[string]string{"dsId": "1"}
 
-       asns, errs, _ := refType.Read(db, v, auth.CurrentUser{})
+       asns, errs, _ := GetRefTypeV11().Read(db, v, auth.CurrentUser{})
 
        if len(errs) > 0 {
                t.Errorf("asn.Read expected: no errors, actual: %v", errs)
@@ -93,7 +93,7 @@ func TestGetASNs(t *testing.T) {
 
 func TestInterfaces(t *testing.T) {
        var i interface{}
-       i = &TOASN{}
+       i = &TOASNV11{}
 
        if _, ok := i.(api.Creator); !ok {
                t.Errorf("asn must be creator")
@@ -114,7 +114,7 @@ func TestInterfaces(t *testing.T) {
 
 func TestValidate(t *testing.T) {
        i := -99
-       asn := TOASN{ASN: &i, CachegroupID: &i}
+       asn := TOASNV11{ASN: &i, CachegroupID: &i}
 
        errs := test.SortErrors(asn.Validate(nil))
        expected := []error{

-- 
To stop receiving notification emails like this one, please contact
dewr...@apache.org.

Reply via email to