trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dang...@apache.org
Subject [trafficcontrol] branch master updated: Fix TM tests for lib/tc version changes
Date Mon, 10 Sep 2018 15:26:56 GMT
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/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new d7b2e9d  Fix TM tests for lib/tc version changes
d7b2e9d is described below

commit d7b2e9d791caad630c20bb3623a987e0aeb2dd1a
Author: Robert Butts <rob@apache.org>
AuthorDate: Mon Sep 10 09:01:36 2018 -0600

    Fix TM tests for lib/tc version changes
---
 traffic_monitor/tmcheck/dsstats.go                            |  2 +-
 traffic_monitor/tmcheck/offlinestates.go                      |  2 +-
 traffic_monitor/tmcheck/peerpoller.go                         |  2 +-
 traffic_monitor/tmcheck/queryinterval.go                      |  2 +-
 traffic_monitor/tmcheck/tmcheck.go                            | 11 +++++------
 .../nagios-validate-deliveryservices.go                       |  2 +-
 .../tools/nagios-validate-offline/nagios-validate-offline.go  |  2 +-
 .../nagios-validate-peerpoller/nagios-validate-peerpoller.go  |  2 +-
 .../nagios-validate-queryinterval.go                          |  2 +-
 traffic_monitor/tools/validator-service/validator-service.go  |  2 +-
 10 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/traffic_monitor/tmcheck/dsstats.go b/traffic_monitor/tmcheck/dsstats.go
index b914f36..e5119f8 100644
--- a/traffic_monitor/tmcheck/dsstats.go
+++ b/traffic_monitor/tmcheck/dsstats.go
@@ -26,7 +26,7 @@ import (
 
 	"github.com/apache/trafficcontrol/lib/go-tc"
 	"github.com/apache/trafficcontrol/traffic_monitor/dsdata"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 )
 
 // ValidateDSStates validates that all Delivery Services in the CRConfig exist in given Traffic
Monitor's DSStats.
diff --git a/traffic_monitor/tmcheck/offlinestates.go b/traffic_monitor/tmcheck/offlinestates.go
index 95a1ed9..b37017e 100644
--- a/traffic_monitor/tmcheck/offlinestates.go
+++ b/traffic_monitor/tmcheck/offlinestates.go
@@ -25,7 +25,7 @@ import (
 	"time"
 
 	"github.com/apache/trafficcontrol/lib/go-tc"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 )
 
 // ValidateOfflineStates validates that no OFFLINE or ADMIN_DOWN caches in the given Traffic
Ops' CRConfig are marked Available in the given Traffic Monitor's CRStates.
diff --git a/traffic_monitor/tmcheck/peerpoller.go b/traffic_monitor/tmcheck/peerpoller.go
index 54927d4..5cad707 100644
--- a/traffic_monitor/tmcheck/peerpoller.go
+++ b/traffic_monitor/tmcheck/peerpoller.go
@@ -22,7 +22,7 @@ package tmcheck
 import (
 	"fmt"
 	"github.com/apache/trafficcontrol/lib/go-tc"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 	"time"
 )
 
diff --git a/traffic_monitor/tmcheck/queryinterval.go b/traffic_monitor/tmcheck/queryinterval.go
index f2c06ca..bdcf678 100644
--- a/traffic_monitor/tmcheck/queryinterval.go
+++ b/traffic_monitor/tmcheck/queryinterval.go
@@ -24,7 +24,7 @@ import (
 	"time"
 
 	"github.com/apache/trafficcontrol/lib/go-tc"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 )
 
 const QueryIntervalMax = time.Duration(10) * time.Second
diff --git a/traffic_monitor/tmcheck/tmcheck.go b/traffic_monitor/tmcheck/tmcheck.go
index d703651..039ac88 100644
--- a/traffic_monitor/tmcheck/tmcheck.go
+++ b/traffic_monitor/tmcheck/tmcheck.go
@@ -29,10 +29,9 @@ import (
 	"time"
 
 	"github.com/apache/trafficcontrol/lib/go-tc"
-	"github.com/apache/trafficcontrol/lib/go-tc/v13"
 	"github.com/apache/trafficcontrol/traffic_monitor/datareq"
 	"github.com/apache/trafficcontrol/traffic_monitor/dsdata"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 )
 
 const RequestTimeout = time.Second * time.Duration(30)
@@ -195,7 +194,7 @@ type CRConfigOrError struct {
 	Err      error
 }
 
-func GetMonitors(toClient *to.Session, includeOffline bool) ([]v13.Server, error) {
+func GetMonitors(toClient *to.Session, includeOffline bool) ([]tc.Server, error) {
 	trafficMonitorType := "RASCAL"
 	monitorTypeQuery := map[string][]string{"type": []string{trafficMonitorType}}
 	servers, _, err := toClient.GetServersByType(monitorTypeQuery)
@@ -261,8 +260,8 @@ func AllValidator(
 }
 
 // FilterOfflines returns only servers which are REPORTED or ONLINE
-func FilterOfflines(servers []v13.Server) []v13.Server {
-	onlineServers := []v13.Server{}
+func FilterOfflines(servers []tc.Server) []tc.Server {
+	onlineServers := []tc.Server{}
 	for _, server := range servers {
 		status := tc.CacheStatusFromString(server.Status)
 		if status != tc.CacheStatusOnline && status != tc.CacheStatusReported {
@@ -273,7 +272,7 @@ func FilterOfflines(servers []v13.Server) []v13.Server {
 	return onlineServers
 }
 
-func GetCDNs(servers []v13.Server) map[tc.CDNName]struct{} {
+func GetCDNs(servers []tc.Server) map[tc.CDNName]struct{} {
 	cdns := map[tc.CDNName]struct{}{}
 	for _, server := range servers {
 		cdns[tc.CDNName(server.CDNName)] = struct{}{}
diff --git a/traffic_monitor/tools/nagios-validate-deliveryservices/nagios-validate-deliveryservices.go
b/traffic_monitor/tools/nagios-validate-deliveryservices/nagios-validate-deliveryservices.go
index 164cd1f..5d61aa8 100644
--- a/traffic_monitor/tools/nagios-validate-deliveryservices/nagios-validate-deliveryservices.go
+++ b/traffic_monitor/tools/nagios-validate-deliveryservices/nagios-validate-deliveryservices.go
@@ -25,7 +25,7 @@ import (
 
 	"github.com/apache/trafficcontrol/lib/go-nagios"
 	"github.com/apache/trafficcontrol/traffic_monitor/tmcheck"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 )
 
 const UserAgent = "tm-offline-validator/0.1"
diff --git a/traffic_monitor/tools/nagios-validate-offline/nagios-validate-offline.go b/traffic_monitor/tools/nagios-validate-offline/nagios-validate-offline.go
index a4fd2be..afe1cbe 100644
--- a/traffic_monitor/tools/nagios-validate-offline/nagios-validate-offline.go
+++ b/traffic_monitor/tools/nagios-validate-offline/nagios-validate-offline.go
@@ -25,7 +25,7 @@ import (
 
 	"github.com/apache/trafficcontrol/lib/go-nagios"
 	"github.com/apache/trafficcontrol/traffic_monitor/tmcheck"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 )
 
 const UserAgent = "tm-offline-validator/0.1"
diff --git a/traffic_monitor/tools/nagios-validate-peerpoller/nagios-validate-peerpoller.go
b/traffic_monitor/tools/nagios-validate-peerpoller/nagios-validate-peerpoller.go
index 4a67164..c52e946 100644
--- a/traffic_monitor/tools/nagios-validate-peerpoller/nagios-validate-peerpoller.go
+++ b/traffic_monitor/tools/nagios-validate-peerpoller/nagios-validate-peerpoller.go
@@ -24,7 +24,7 @@ import (
 	"fmt"
 	"github.com/apache/trafficcontrol/lib/go-nagios"
 	"github.com/apache/trafficcontrol/traffic_monitor/tmcheck"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 )
 
 const UserAgent = "tm-peerpoller-validator/0.1"
diff --git a/traffic_monitor/tools/nagios-validate-queryinterval/nagios-validate-queryinterval.go
b/traffic_monitor/tools/nagios-validate-queryinterval/nagios-validate-queryinterval.go
index 178a885..90bf3ec 100644
--- a/traffic_monitor/tools/nagios-validate-queryinterval/nagios-validate-queryinterval.go
+++ b/traffic_monitor/tools/nagios-validate-queryinterval/nagios-validate-queryinterval.go
@@ -24,7 +24,7 @@ import (
 	"fmt"
 	"github.com/apache/trafficcontrol/lib/go-nagios"
 	"github.com/apache/trafficcontrol/traffic_monitor/tmcheck"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 )
 
 const UserAgent = "tm-queryinterval-validator/0.1"
diff --git a/traffic_monitor/tools/validator-service/validator-service.go b/traffic_monitor/tools/validator-service/validator-service.go
index a20f849..584f200 100644
--- a/traffic_monitor/tools/validator-service/validator-service.go
+++ b/traffic_monitor/tools/validator-service/validator-service.go
@@ -26,7 +26,7 @@ import (
 	"fmt"
 	"github.com/apache/trafficcontrol/lib/go-tc"
 	"github.com/apache/trafficcontrol/traffic_monitor/tmcheck"
-	to "github.com/apache/trafficcontrol/traffic_ops/client/v13"
+	to "github.com/apache/trafficcontrol/traffic_ops/client"
 	"io"
 	"net/http"
 	"sort"


Mime
View raw message