You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/02/26 16:45:10 UTC

[incubator-trafficcontrol] 04/17: added TestInterfaces test

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 27525fca50b9031a3462710b9d3bec0c4514bcfc
Author: Dewayne Richardson <de...@apache.org>
AuthorDate: Tue Feb 20 14:41:04 2018 -0700

    added TestInterfaces test
---
 .../physlocation/phys_locations_test.go            | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/traffic_ops/traffic_ops_golang/physlocation/phys_locations_test.go b/traffic_ops/traffic_ops_golang/physlocation/phys_locations_test.go
index adc1312..26d25d7 100644
--- a/traffic_ops/traffic_ops_golang/physlocation/phys_locations_test.go
+++ b/traffic_ops/traffic_ops_golang/physlocation/phys_locations_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/api"
 	"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"
@@ -102,3 +103,24 @@ func TestGetPhysLocations(t *testing.T) {
 	}
 
 }
+
+func TestInterfaces(t *testing.T) {
+	var i interface{}
+	i = &TOPhysLocation{}
+
+	if _, ok := i.(api.Inserter); !ok {
+		t.Errorf("PhysLocation must be Inserter")
+	}
+	if _, ok := i.(api.Reader); !ok {
+		t.Errorf("PhysLocation must be Reader")
+	}
+	if _, ok := i.(api.Updater); !ok {
+		t.Errorf("PhysLocation must be Updater")
+	}
+	if _, ok := i.(api.Deleter); !ok {
+		t.Errorf("PhysLocation must be Deleter")
+	}
+	if _, ok := i.(api.Identifier); !ok {
+		t.Errorf("PhysLocation must be Identifier")
+	}
+}

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