You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2018/03/01 20:44:50 UTC
[incubator-trafficcontrol] branch master updated: sort errors in
asn/cdn tests
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 cc63c71 sort errors in asn/cdn tests
cc63c71 is described below
commit cc63c715423eddb8acf06ad6c3d4049d296d8f9d
Author: Dan Kirkwood <da...@apache.org>
AuthorDate: Thu Mar 1 13:40:15 2018 -0700
sort errors in asn/cdn tests
---
traffic_ops/traffic_ops_golang/asn/asns_test.go | 2 +-
traffic_ops/traffic_ops_golang/cdn/cdns_test.go | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/traffic_ops/traffic_ops_golang/asn/asns_test.go b/traffic_ops/traffic_ops_golang/asn/asns_test.go
index b1d0bb4..dcb0a3b 100644
--- a/traffic_ops/traffic_ops_golang/asn/asns_test.go
+++ b/traffic_ops/traffic_ops_golang/asn/asns_test.go
@@ -114,7 +114,7 @@ func TestValidate(t *testing.T) {
i := -99
asn := TOASN{ASN: &i, CachegroupID: &i}
- errs := asn.Validate(nil)
+ errs := test.SortErrors(asn.Validate(nil))
expected := []error{
errors.New(`'asn' must be no less than 0`),
errors.New(`'cachegroupId' must be no less than 0`),
diff --git a/traffic_ops/traffic_ops_golang/cdn/cdns_test.go b/traffic_ops/traffic_ops_golang/cdn/cdns_test.go
index 65b676f..c514efe 100644
--- a/traffic_ops/traffic_ops_golang/cdn/cdns_test.go
+++ b/traffic_ops/traffic_ops_golang/cdn/cdns_test.go
@@ -132,11 +132,11 @@ func TestValidate(t *testing.T) {
// invalid name, empty domainname
n := "not_a_valid_cdn"
c := TOCDN{Name: &n}
- errs := c.Validate(nil)
+ errs := test.SortErrors(c.Validate(nil))
expectedErrs := []error{
- errors.New(`'name' invalid characters found - Use alphanumeric . or - .`),
errors.New(`'domainName' cannot be blank`),
+ errors.New(`'name' invalid characters found - Use alphanumeric . or - .`),
}
if !reflect.DeepEqual(expectedErrs, errs) {
--
To stop receiving notification emails like this one, please contact
dewrich@apache.org.