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/07/17 22:16:10 UTC

[trafficcontrol] branch master updated (573f16b -> e566efe)

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

dangogh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git.


    from 573f16b  Adds a build docker file for grovetccfg and updates the build scripts to build grovetccfg.
     new daf11c8  fixed deliveryservice struct versioning issue. fixes #2527
     new e566efe  fix deepcaching enum validation check

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 lib/go-tc/deliveryservices.go | 4 ++--
 lib/go-tc/enum_test.go        | 2 +-
 lib/go-tc/tovalidate/rules.go | 4 +++-
 3 files changed, 6 insertions(+), 4 deletions(-)


[trafficcontrol] 02/02: fix deepcaching enum validation check

Posted by da...@apache.org.
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

commit e566efedd2b5cda9b9d9e44acfc6a247177a2b54
Author: Dan Kirkwood <da...@apache.org>
AuthorDate: Tue Jul 17 16:04:08 2018 -0600

    fix deepcaching enum validation check
---
 lib/go-tc/enum_test.go        | 2 +-
 lib/go-tc/tovalidate/rules.go | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/go-tc/enum_test.go b/lib/go-tc/enum_test.go
index 95fb64a..a06e0b1 100644
--- a/lib/go-tc/enum_test.go
+++ b/lib/go-tc/enum_test.go
@@ -62,7 +62,7 @@ func TestDeepCachingType(t *testing.T) {
 	}
 
 	// make sure we get the right default when marshalled within a new delivery service
-	var ds DeliveryService
+	var ds DeliveryServiceV13
 	_, err := json.MarshalIndent(ds, ``, `  `)
 	if err != nil {
 		t.Errorf(err.Error())
diff --git a/lib/go-tc/tovalidate/rules.go b/lib/go-tc/tovalidate/rules.go
index 1e86407..940424c 100644
--- a/lib/go-tc/tovalidate/rules.go
+++ b/lib/go-tc/tovalidate/rules.go
@@ -46,7 +46,9 @@ func IsOneOfStringICase(set ...string) func(string) bool {
 	for _, s := range set {
 		lowcased = append(lowcased, strings.ToLower(s))
 	}
-	return IsOneOfString(lowcased...)
+	return func(s string) bool {
+		return IsOneOfString(lowcased...)(strings.ToLower(s))
+	}
 }
 
 func IsGreaterThanZero(value interface{}) error {


[trafficcontrol] 01/02: fixed deliveryservice struct versioning issue. fixes #2527

Posted by da...@apache.org.
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

commit daf11c829458c516d60185d7918b0bfbe0e74019
Author: Jesse Rivas <je...@comcast.com>
AuthorDate: Tue Jul 17 11:28:02 2018 -0600

    fixed deliveryservice struct versioning issue. fixes #2527
---
 lib/go-tc/deliveryservices.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/go-tc/deliveryservices.go b/lib/go-tc/deliveryservices.go
index e9fa6ee..d0429e7 100644
--- a/lib/go-tc/deliveryservices.go
+++ b/lib/go-tc/deliveryservices.go
@@ -441,14 +441,14 @@ func (ds *DeliveryServiceNullableV13) Validate(tx *sql.Tx) error {
 
 // Value implements the driver.Valuer interface
 // marshals struct to json to pass back as a json.RawMessage
-func (d *DeliveryServiceNullable) Value() (driver.Value, error) {
+func (d *DeliveryServiceNullableV13) Value() (driver.Value, error) {
 	b, err := json.Marshal(d)
 	return b, err
 }
 
 // Scan implements the sql.Scanner interface
 // expects json.RawMessage and unmarshals to a deliveryservice struct
-func (d *DeliveryServiceNullable) Scan(src interface{}) error {
+func (d *DeliveryServiceNullableV13) Scan(src interface{}) error {
 	b, ok := src.([]byte)
 	if !ok {
 		return fmt.Errorf("expected deliveryservice in byte array form; got %T", src)