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 04737ff55539ad9f2ae7ccbf6a0f53897c43384f
Author: Dewayne Richardson <dewr...@apache.org>
AuthorDate: Thu Mar 1 13:11:39 2018 -0700

    cleaned up the parameters to improve testing performance
    
    commented out test order for more CRUD build out
    
    moved off phys_location_test.go for now
---
 traffic_ops/testing/api/v13/parameters_test.go     |   6 +-
 traffic_ops/testing/api/v13/phys_locations_test.go | 108 -------------------
 traffic_ops/testing/api/v13/tc-fixtures.json       | 119 ---------------------
 3 files changed, 5 insertions(+), 228 deletions(-)

diff --git a/traffic_ops/testing/api/v13/parameters_test.go 
b/traffic_ops/testing/api/v13/parameters_test.go
index 666011d..916e546 100644
--- a/traffic_ops/testing/api/v13/parameters_test.go
+++ b/traffic_ops/testing/api/v13/parameters_test.go
@@ -16,6 +16,7 @@
 package v13
 
 import (
+       "fmt"
        "testing"
 
        "github.com/apache/incubator-trafficcontrol/lib/go-log"
@@ -26,7 +27,7 @@ func TestParameters(t *testing.T) {
 
        CreateTestParameters(t)
        //UpdateTestParameters(t)
-       //GetTestParameters(t)
+       GetTestParameters(t)
        DeleteTestParameters(t)
 
 }
@@ -97,6 +98,7 @@ func DeleteTestParameters(t *testing.T) {
                        if err != nil {
                                t.Errorf("cannot DELETE Parameter by name: %v - 
%v\n", err, delResp)
                        }
+                       //time.Sleep(1 * time.Second)
 
                        // Retrieve the Parameter to see if it got deleted
                        pls, _, err := 
TOSession.GetParameterByNameAndConfigFile(pl.Name, pl.ConfigFile)
@@ -106,6 +108,8 @@ func DeleteTestParameters(t *testing.T) {
                        if len(pls) > 0 {
                                t.Errorf("expected Parameter Name: %s and 
ConfigFile: %s to be deleted\n", pl.Name, pl.ConfigFile)
                        }
+               } else {
+                       fmt.Printf("no resp ---> %v\n", resp)
                }
        }
 }
diff --git a/traffic_ops/testing/api/v13/phys_locations_test.go 
b/traffic_ops/testing/api/v13/phys_locations_test.go
deleted file mode 100644
index aa5f787..0000000
--- a/traffic_ops/testing/api/v13/phys_locations_test.go
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-*/
-
-package v13
-
-import (
-       "testing"
-
-       "github.com/apache/incubator-trafficcontrol/lib/go-log"
-       tc "github.com/apache/incubator-trafficcontrol/lib/go-tc"
-)
-
-func TestPhysLocations(t *testing.T) {
-
-       CreateTestPhysLocations(t)
-       UpdateTestPhysLocations(t)
-       GetTestPhysLocations(t)
-       DeleteTestPhysLocations(t)
-
-}
-
-func CreateTestPhysLocations(t *testing.T) {
-
-       for _, pl := range testData.PhysLocations {
-               resp, _, err := TOSession.CreatePhysLocation(pl)
-               log.Debugln("Response: ", resp)
-               if err != nil {
-                       t.Errorf("could not CREATE phys_locations: %v\n", err)
-               }
-       }
-
-}
-
-func UpdateTestPhysLocations(t *testing.T) {
-
-       firstPhysLocation := testData.PhysLocations[0]
-       // Retrieve the PhysLocation by name so we can get the id for the Update
-       resp, _, err := TOSession.GetPhysLocationByName(firstPhysLocation.Name)
-       if err != nil {
-               t.Errorf("cannot GET PhysLocation by name: %v - %v\n", 
firstPhysLocation.Name, err)
-       }
-       remotePhysLocation := resp[0]
-       expectedPhysLocationName := "UPDATED"
-       remotePhysLocation.Name = expectedPhysLocationName
-       var alert tc.Alerts
-       alert, _, err = TOSession.UpdatePhysLocationByID(remotePhysLocation.ID, 
remotePhysLocation)
-       if err != nil {
-               t.Errorf("cannot UPDATE PhysLocation by id: %v - %v\n", err, 
alert)
-       }
-
-       // Retrieve the PhysLocation to check PhysLocation name got updated
-       resp, _, err = TOSession.GetPhysLocationByID(remotePhysLocation.ID)
-       if err != nil {
-               t.Errorf("cannot GET PhysLocation by name: %v - %v\n", 
firstPhysLocation.Name, err)
-       }
-       respPhysLocation := resp[0]
-       if respPhysLocation.Name != expectedPhysLocationName {
-               t.Errorf("results do not match actual: %s, expected: %s\n", 
respPhysLocation.Name, expectedPhysLocationName)
-       }
-
-}
-
-func GetTestPhysLocations(t *testing.T) {
-
-       for _, pl := range testData.PhysLocations {
-               resp, _, err := TOSession.GetPhysLocationByName(pl.Name)
-               if err != nil {
-                       t.Errorf("cannot GET PhysLocation by name: %v - %v\n", 
err, resp)
-               }
-       }
-}
-
-func DeleteTestPhysLocations(t *testing.T) {
-
-       pl := testData.PhysLocations[1]
-       // Retrieve the PhysLocation by name so we can get the id for the Update
-       resp, _, err := TOSession.GetPhysLocationByName(pl.Name)
-       if err != nil {
-               t.Errorf("cannot GET PhysLocation by name: %v - %v\n", pl.Name, 
err)
-       }
-       respPhysLocation := resp[0]
-
-       delResp, _, err := TOSession.DeletePhysLocationByID(respPhysLocation.ID)
-       if err != nil {
-               t.Errorf("cannot DELETE PhysLocation by name: %v - %v\n", err, 
delResp)
-       }
-
-       // Retrieve the PhysLocation to see if it got deleted
-       pls, _, err := TOSession.GetPhysLocationByName(pl.Name)
-       if err != nil {
-               t.Errorf("error deleting PhysLocation name: %s\n", err.Error())
-       }
-       if len(pls) > 0 {
-               t.Errorf("expected PhysLocation name: %s to be deleted\n", 
pl.Name)
-       }
-}
diff --git a/traffic_ops/testing/api/v13/tc-fixtures.json 
b/traffic_ops/testing/api/v13/tc-fixtures.json
index fdc57c4..33f2459 100644
--- a/traffic_ops/testing/api/v13/tc-fixtures.json
+++ b/traffic_ops/testing/api/v13/tc-fixtures.json
@@ -306,13 +306,6 @@
         },
         {
             "configFile": "url_sig_cdl-c2.config",
-            "lastUpdated": "2018-01-19T19:01:21.429365+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver"
-        },
-        {
-            "configFile": "url_sig_cdl-c2.config",
             "lastUpdated": "2018-01-19T19:01:21.431062+00:00",
             "name": "error_url",
             "secure": false,
@@ -368,27 +361,6 @@
             "value": "STRING parent.config"
         },
         {
-            "configFile": "12M_facts",
-            "lastUpdated": "2018-01-19T19:01:21.443436+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/ort"
-        },
-        {
-            "configFile": "cacheurl.config",
-            "lastUpdated": "2018-01-19T19:01:21.444898+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver/"
-        },
-        {
-            "configFile": "ip_allow.config",
-            "lastUpdated": "2018-01-19T19:01:21.446396+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver"
-        },
-        {
             "configFile": "plugin.config",
             "lastUpdated": "2018-01-19T19:01:21.447837+00:00",
             "name": "astats_over_http.so",
@@ -396,48 +368,6 @@
             "value": "_astats 
33.101.99.100,172.39.19.39,172.39.19.49,172.39.19.49,172.39.29.49"
         },
         {
-            "configFile": "crontab_root",
-            "lastUpdated": "2018-01-19T19:01:21.449259+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/var/spool/cron"
-        },
-        {
-            "configFile": "hdr_rw_cdl-c2.config",
-            "lastUpdated": "2018-01-19T19:01:21.450778+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver"
-        },
-        {
-            "configFile": "50-ats.rules",
-            "lastUpdated": "2018-01-19T19:01:21.452196+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/etc/udev/rules.d/"
-        },
-        {
-            "configFile": "parent.config",
-            "lastUpdated": "2018-01-19T19:01:21.453716+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver/"
-        },
-        {
-            "configFile": "remap.config",
-            "lastUpdated": "2018-01-19T19:01:21.456753+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver/"
-        },
-        {
-            "configFile": "drop_qstring.config",
-            "lastUpdated": "2018-01-19T19:01:21.45835+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver"
-        },
-        {
             "configFile": "logs_xml.config",
             "lastUpdated": "2018-01-19T19:01:21.461206+00:00",
             "name": "LogFormat.Name",
@@ -459,13 +389,6 @@
             "value": "custom_ats_2"
         },
         {
-            "configFile": "cache.config",
-            "lastUpdated": "2018-01-19T19:01:21.465717+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver/"
-        },
-        {
             "configFile": "records.config",
             "lastUpdated": "2018-01-19T19:01:21.467349+00:00",
             "name": "CONFIG proxy.config.cache.control.filename",
@@ -480,34 +403,6 @@
             "value": "--config regex_revalidate.config"
         },
         {
-            "configFile": "regex_revalidate.config",
-            "lastUpdated": "2018-01-19T19:01:21.470677+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver"
-        },
-        {
-            "configFile": "hosting.config",
-            "lastUpdated": "2018-01-19T19:01:21.474023+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver/"
-        },
-        {
-            "configFile": "volume.config",
-            "lastUpdated": "2018-01-19T19:01:21.475515+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver/"
-        },
-        {
-            "configFile": "astats.config",
-            "lastUpdated": "2018-01-19T19:01:21.477074+00:00",
-            "name": "allow_ip",
-            "secure": false,
-            "value": "127.0.0.1,172.39.0.0/16,33.101.99.0/24"
-        },
-        {
             "configFile": "astats.config",
             "lastUpdated": "2018-01-19T19:01:21.478516+00:00",
             "name": "allow_ip6",
@@ -523,13 +418,6 @@
         },
         {
             "configFile": "astats.config",
-            "lastUpdated": "2018-01-19T19:01:21.481582+00:00",
-            "name": "location",
-            "secure": false,
-            "value": "/opt/trafficserver/etc/trafficserver"
-        },
-        {
-            "configFile": "astats.config",
             "lastUpdated": "2018-01-19T19:01:21.482959+00:00",
             "name": "path",
             "secure": false,
@@ -572,13 +460,6 @@
         },
         {
             "configFile": "regex_revalidate.config",
-            "lastUpdated": "2018-01-19T19:01:21.494468+00:00",
-            "name": "maxRevalDurationDays",
-            "secure": false,
-            "value": "3"
-        },
-        {
-            "configFile": "regex_revalidate.config",
             "lastUpdated": "2018-01-19T19:01:21.496195+00:00",
             "name": "maxRevalDurationDays",
             "secure": false,

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

Reply via email to