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 273ed96e5658be777b6b288ff8b9530722409042
Author: Dewayne Richardson <dewr...@apache.org>
AuthorDate: Thu Mar 1 10:50:58 2018 -0700

    escaped the query parameter
    
    removed print stmts
    
    updated to use the CRUD interface
    
    moved the status_test to v13 dir
    
    copied from branch
    
    moved package line up
    
    added division creation to link up foreign keys
    
    removed debug
    
    refactored to support TO Client versioning with packages
    
    added initial cachegroups API test and added v13 package
    
    fixed conflicts
    
    temporarily removed to allow to compile
    
    updated to use the CRUD interface
    
    moved the status_test to v13 dir
    
    copied from branch
    
    moved package line up
    
    added division creation to link up foreign keys
    
    removed debug
    
    refactored to support TO Client versioning with packages
    
    added initial cachegroups API test and added v13 package
    
    fixed conflicts
    
    temporarily removed to allow to compile
    
    fixed merge conflicts
    
    added test parameters
---
 traffic_ops/client/v13/parameter.go            |  6 +--
 traffic_ops/testing/api/v13/parameters_test.go |  3 --
 traffic_ops/testing/api/v13/tc-fixtures.json   | 62 --------------------------
 3 files changed, 3 insertions(+), 68 deletions(-)

diff --git a/traffic_ops/client/v13/parameter.go 
b/traffic_ops/client/v13/parameter.go
index 0de8d0d..6b5c4ce 100644
--- a/traffic_ops/client/v13/parameter.go
+++ b/traffic_ops/client/v13/parameter.go
@@ -20,6 +20,7 @@ import (
        "fmt"
        "net"
        "net/http"
+       "net/url"
 
        "github.com/apache/incubator-trafficcontrol/lib/go-tc"
 )
@@ -101,9 +102,8 @@ func (to *Session) GetParameterByID(id int) 
([]tc.Parameter, ReqInf, error) {
 
 // GET a Parameter by the Parameter name
 func (to *Session) GetParameterByName(name string) ([]tc.Parameter, ReqInf, 
error) {
-       url := API_v13_Parameters + "?name=" + name
-       fmt.Printf("url ---> %v\n", url)
-       resp, remoteAddr, err := to.request(http.MethodGet, url, nil)
+       URI := API_v13_Parameters + "?name=" + url.QueryEscape(name)
+       resp, remoteAddr, err := to.request(http.MethodGet, URI, nil)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {
                return nil, reqInf, err
diff --git a/traffic_ops/testing/api/v13/parameters_test.go 
b/traffic_ops/testing/api/v13/parameters_test.go
index 50004c2..09e6208 100644
--- a/traffic_ops/testing/api/v13/parameters_test.go
+++ b/traffic_ops/testing/api/v13/parameters_test.go
@@ -16,7 +16,6 @@
 package v13
 
 import (
-       "fmt"
        "testing"
 
        "github.com/apache/incubator-trafficcontrol/lib/go-log"
@@ -47,10 +46,8 @@ func CreateTestParameters(t *testing.T) {
 func UpdateTestParameters(t *testing.T) {
 
        firstParameter := testData.Parameters[0]
-       fmt.Printf("firstParameter ---> %v\n", firstParameter)
        // Retrieve the Parameter by name so we can get the id for the Update
        resp, _, err := TOSession.GetParameterByName(firstParameter.Name)
-       fmt.Printf("resp ---> %v\n", resp)
        if err != nil {
                t.Errorf("cannot GET Parameter by name: %v - %v\n", 
firstParameter.Name, err)
        }
diff --git a/traffic_ops/testing/api/v13/tc-fixtures.json 
b/traffic_ops/testing/api/v13/tc-fixtures.json
index de02966..fdc57c4 100644
--- a/traffic_ops/testing/api/v13/tc-fixtures.json
+++ b/traffic_ops/testing/api/v13/tc-fixtures.json
@@ -173,7 +173,6 @@
     "parameters": [
         {
             "configFile": "rascal.properties",
-            "id": 4,
             "lastUpdated": "2018-01-19T19:01:21.455131+00:00",
             "name": "health.threshold.loadavg",
             "secure": false,
@@ -181,7 +180,6 @@
         },
         {
             "configFile": "rascal.properties",
-            "id": 5,
             "lastUpdated": "2018-01-19T19:01:21.472279+00:00",
             "name": "health.threshold.availableBandwidthInKbps",
             "secure": false,
@@ -189,7 +187,6 @@
         },
         {
             "configFile": "rascal.properties",
-            "id": 6,
             "lastUpdated": "2018-01-19T19:01:21.489534+00:00",
             "name": "history.count",
             "secure": false,
@@ -197,7 +194,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 7,
             "lastUpdated": "2018-01-19T19:01:21.503311+00:00",
             "name": "key0",
             "secure": false,
@@ -205,7 +201,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 8,
             "lastUpdated": "2018-01-19T19:01:21.505157+00:00",
             "name": "key1",
             "secure": false,
@@ -213,7 +208,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 9,
             "lastUpdated": "2018-01-19T19:01:21.508548+00:00",
             "name": "key2",
             "secure": false,
@@ -221,7 +215,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 10,
             "lastUpdated": "2018-01-19T19:01:21.401781+00:00",
             "name": "key3",
             "secure": false,
@@ -229,7 +222,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 11,
             "lastUpdated": "2018-01-19T19:01:21.406601+00:00",
             "name": "key4",
             "secure": false,
@@ -237,7 +229,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 12,
             "lastUpdated": "2018-01-19T19:01:21.408784+00:00",
             "name": "key5",
             "secure": false,
@@ -245,7 +236,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 13,
             "lastUpdated": "2018-01-19T19:01:21.410854+00:00",
             "name": "key6",
             "secure": false,
@@ -253,7 +243,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 14,
             "lastUpdated": "2018-01-19T19:01:21.412716+00:00",
             "name": "key7",
             "secure": false,
@@ -261,7 +250,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 15,
             "lastUpdated": "2018-01-19T19:01:21.414638+00:00",
             "name": "key8",
             "secure": false,
@@ -269,7 +257,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 16,
             "lastUpdated": "2018-01-19T19:01:21.416551+00:00",
             "name": "key9",
             "secure": false,
@@ -277,7 +264,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 17,
             "lastUpdated": "2018-01-19T19:01:21.418689+00:00",
             "name": "key10",
             "secure": false,
@@ -285,7 +271,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 18,
             "lastUpdated": "2018-01-19T19:01:21.420467+00:00",
             "name": "key11",
             "secure": false,
@@ -293,7 +278,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 19,
             "lastUpdated": "2018-01-19T19:01:21.422414+00:00",
             "name": "key12",
             "secure": false,
@@ -301,7 +285,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 20,
             "lastUpdated": "2018-01-19T19:01:21.424435+00:00",
             "name": "key13",
             "secure": false,
@@ -309,7 +292,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 21,
             "lastUpdated": "2018-01-19T19:01:21.426125+00:00",
             "name": "key14",
             "secure": false,
@@ -317,7 +299,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 22,
             "lastUpdated": "2018-01-19T19:01:21.427797+00:00",
             "name": "key15",
             "secure": false,
@@ -325,7 +306,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 23,
             "lastUpdated": "2018-01-19T19:01:21.429365+00:00",
             "name": "location",
             "secure": false,
@@ -333,7 +313,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "id": 24,
             "lastUpdated": "2018-01-19T19:01:21.431062+00:00",
             "name": "error_url",
             "secure": false,
@@ -341,7 +320,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 25,
             "lastUpdated": "2018-01-19T19:01:21.432692+00:00",
             "name": "CONFIG proxy.config.allocator.debug_filter",
             "secure": false,
@@ -349,7 +327,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 26,
             "lastUpdated": "2018-01-19T19:01:21.434425+00:00",
             "name": "CONFIG proxy.config.allocator.enable_reclaim",
             "secure": false,
@@ -357,7 +334,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 27,
             "lastUpdated": "2018-01-19T19:01:21.435957+00:00",
             "name": "CONFIG proxy.config.allocator.max_overage",
             "secure": false,
@@ -365,7 +341,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 28,
             "lastUpdated": "2018-01-19T19:01:21.437496+00:00",
             "name": "CONFIG proxy.config.diags.show_location",
             "secure": false,
@@ -373,7 +348,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 29,
             "lastUpdated": "2018-01-19T19:01:21.439033+00:00",
             "name": "CONFIG proxy.config.http.cache.allow_empty_doc",
             "secure": false,
@@ -381,7 +355,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 30,
             "lastUpdated": "2018-01-19T19:01:21.440502+00:00",
             "name": "LOCAL proxy.config.cache.interim.storage",
             "secure": false,
@@ -389,7 +362,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 31,
             "lastUpdated": "2018-01-19T19:01:21.441933+00:00",
             "name": "CONFIG proxy.config.http.parent_proxy.file",
             "secure": false,
@@ -397,7 +369,6 @@
         },
         {
             "configFile": "12M_facts",
-            "id": 32,
             "lastUpdated": "2018-01-19T19:01:21.443436+00:00",
             "name": "location",
             "secure": false,
@@ -405,7 +376,6 @@
         },
         {
             "configFile": "cacheurl.config",
-            "id": 33,
             "lastUpdated": "2018-01-19T19:01:21.444898+00:00",
             "name": "location",
             "secure": false,
@@ -413,7 +383,6 @@
         },
         {
             "configFile": "ip_allow.config",
-            "id": 34,
             "lastUpdated": "2018-01-19T19:01:21.446396+00:00",
             "name": "location",
             "secure": false,
@@ -421,7 +390,6 @@
         },
         {
             "configFile": "plugin.config",
-            "id": 35,
             "lastUpdated": "2018-01-19T19:01:21.447837+00:00",
             "name": "astats_over_http.so",
             "secure": false,
@@ -429,7 +397,6 @@
         },
         {
             "configFile": "crontab_root",
-            "id": 36,
             "lastUpdated": "2018-01-19T19:01:21.449259+00:00",
             "name": "location",
             "secure": false,
@@ -437,7 +404,6 @@
         },
         {
             "configFile": "hdr_rw_cdl-c2.config",
-            "id": 37,
             "lastUpdated": "2018-01-19T19:01:21.450778+00:00",
             "name": "location",
             "secure": false,
@@ -445,7 +411,6 @@
         },
         {
             "configFile": "50-ats.rules",
-            "id": 38,
             "lastUpdated": "2018-01-19T19:01:21.452196+00:00",
             "name": "location",
             "secure": false,
@@ -453,7 +418,6 @@
         },
         {
             "configFile": "parent.config",
-            "id": 39,
             "lastUpdated": "2018-01-19T19:01:21.453716+00:00",
             "name": "location",
             "secure": false,
@@ -461,7 +425,6 @@
         },
         {
             "configFile": "remap.config",
-            "id": 40,
             "lastUpdated": "2018-01-19T19:01:21.456753+00:00",
             "name": "location",
             "secure": false,
@@ -469,7 +432,6 @@
         },
         {
             "configFile": "drop_qstring.config",
-            "id": 41,
             "lastUpdated": "2018-01-19T19:01:21.45835+00:00",
             "name": "location",
             "secure": false,
@@ -477,7 +439,6 @@
         },
         {
             "configFile": "logs_xml.config",
-            "id": 43,
             "lastUpdated": "2018-01-19T19:01:21.461206+00:00",
             "name": "LogFormat.Name",
             "secure": false,
@@ -485,7 +446,6 @@
         },
         {
             "configFile": "logs_xml.config",
-            "id": 44,
             "lastUpdated": "2018-01-19T19:01:21.462772+00:00",
             "name": "LogObject.Format",
             "secure": false,
@@ -493,7 +453,6 @@
         },
         {
             "configFile": "logs_xml.config",
-            "id": 45,
             "lastUpdated": "2018-01-19T19:01:21.464259+00:00",
             "name": "LogObject.Filename",
             "secure": false,
@@ -501,7 +460,6 @@
         },
         {
             "configFile": "cache.config",
-            "id": 46,
             "lastUpdated": "2018-01-19T19:01:21.465717+00:00",
             "name": "location",
             "secure": false,
@@ -509,7 +467,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 47,
             "lastUpdated": "2018-01-19T19:01:21.467349+00:00",
             "name": "CONFIG proxy.config.cache.control.filename",
             "secure": false,
@@ -517,7 +474,6 @@
         },
         {
             "configFile": "plugin.config",
-            "id": 48,
             "lastUpdated": "2018-01-19T19:01:21.469075+00:00",
             "name": "regex_revalidate.so",
             "secure": false,
@@ -525,7 +481,6 @@
         },
         {
             "configFile": "regex_revalidate.config",
-            "id": 49,
             "lastUpdated": "2018-01-19T19:01:21.470677+00:00",
             "name": "location",
             "secure": false,
@@ -533,7 +488,6 @@
         },
         {
             "configFile": "hosting.config",
-            "id": 50,
             "lastUpdated": "2018-01-19T19:01:21.474023+00:00",
             "name": "location",
             "secure": false,
@@ -541,7 +495,6 @@
         },
         {
             "configFile": "volume.config",
-            "id": 51,
             "lastUpdated": "2018-01-19T19:01:21.475515+00:00",
             "name": "location",
             "secure": false,
@@ -549,7 +502,6 @@
         },
         {
             "configFile": "astats.config",
-            "id": 52,
             "lastUpdated": "2018-01-19T19:01:21.477074+00:00",
             "name": "allow_ip",
             "secure": false,
@@ -557,7 +509,6 @@
         },
         {
             "configFile": "astats.config",
-            "id": 53,
             "lastUpdated": "2018-01-19T19:01:21.478516+00:00",
             "name": "allow_ip6",
             "secure": false,
@@ -565,7 +516,6 @@
         },
         {
             "configFile": "astats.config",
-            "id": 54,
             "lastUpdated": "2018-01-19T19:01:21.480143+00:00",
             "name": "record_types",
             "secure": false,
@@ -573,7 +523,6 @@
         },
         {
             "configFile": "astats.config",
-            "id": 55,
             "lastUpdated": "2018-01-19T19:01:21.481582+00:00",
             "name": "location",
             "secure": false,
@@ -581,7 +530,6 @@
         },
         {
             "configFile": "astats.config",
-            "id": 56,
             "lastUpdated": "2018-01-19T19:01:21.482959+00:00",
             "name": "path",
             "secure": false,
@@ -589,7 +537,6 @@
         },
         {
             "configFile": "storage.config",
-            "id": 57,
             "lastUpdated": "2018-01-19T19:01:21.484501+00:00",
             "name": "location",
             "secure": false,
@@ -597,7 +544,6 @@
         },
         {
             "configFile": "storage.config",
-            "id": 58,
             "lastUpdated": "2018-01-19T19:01:21.48625+00:00",
             "name": "Drive_Prefix",
             "secure": false,
@@ -605,7 +551,6 @@
         },
         {
             "configFile": "storage.config",
-            "id": 59,
             "lastUpdated": "2018-01-19T19:01:21.487958+00:00",
             "name": "Drive_Letters",
             "secure": false,
@@ -613,7 +558,6 @@
         },
         {
             "configFile": "storage.config",
-            "id": 60,
             "lastUpdated": "2018-01-19T19:01:21.491181+00:00",
             "name": "Disk_Volume",
             "secure": false,
@@ -621,7 +565,6 @@
         },
         {
             "configFile": "records.config",
-            "id": 61,
             "lastUpdated": "2018-01-19T19:01:21.49285+00:00",
             "name": "CONFIG proxy.config.hostdb.storage_size",
             "secure": false,
@@ -629,7 +572,6 @@
         },
         {
             "configFile": "regex_revalidate.config",
-            "id": 63,
             "lastUpdated": "2018-01-19T19:01:21.494468+00:00",
             "name": "maxRevalDurationDays",
             "secure": false,
@@ -637,7 +579,6 @@
         },
         {
             "configFile": "regex_revalidate.config",
-            "id": 64,
             "lastUpdated": "2018-01-19T19:01:21.496195+00:00",
             "name": "maxRevalDurationDays",
             "secure": false,
@@ -645,7 +586,6 @@
         },
         {
             "configFile": "whaterver.config",
-            "id": 65,
             "lastUpdated": "2018-01-19T19:01:21.497838+00:00",
             "name": "unassigned_parameter_1",
             "secure": false,
@@ -653,7 +593,6 @@
         },
         {
             "configFile": "package",
-            "id": 66,
             "lastUpdated": "2018-01-19T19:01:21.499423+00:00",
             "name": "trafficserver",
             "secure": false,
@@ -661,7 +600,6 @@
         },
         {
             "configFile": "global",
-            "id": 67,
             "lastUpdated": "2018-01-19T19:01:21.501151+00:00",
             "name": "use_tenancy",
             "secure": false,

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

Reply via email to