zrhoffman opened a new issue #5203: URL: https://github.com/apache/trafficcontrol/issues/5203
<!-- ************ STOP!! ************ If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact the Apache Traffic Control Security Team at [email protected] and follow the guidelines at https://www.apache.org/security/ regarding vulnerability disclosure. - For *SUPPORT QUESTIONS*, use the Traffic Control slack (https://s.apache.org/atc-slack) or Traffic Control mailing lists (https://trafficcontrol.apache.org/mailing_lists). - Before submitting, please **SEARCH GITHUB** for a similar issue or PR. --> ## I'm submitting a ... <!-- delete all those that don't apply --> <!--- security vulnerability (STOP!! - see above)--> - bug report ## Traffic Control components affected ... <!-- delete all those that don't apply --> - Traffic Ops ## Current behavior: <!-- Describe how the bug manifests --> The `TestDeliveryServices` API test fails when `includeSystemTests` is enabled. ## Expected behavior: <!-- Describe what the behavior would be without the bug --> All API tests should pass. ## Minimal reproduction of the problem with instructions: <!-- If the current behavior is a bug, please provide the *STEPS TO REPRODUCE* and include the applicable TC version. --> 1. Build and start CDN-in-a-Box, since Traffic Vault is required to reproduce the failed test 2. Wait for Traffic Router to get past `Waiting for Traffic Monitor to start...`, which indicates that Traffic Vault is running. 3 (optional). Apply this patch so that only API v3 `TestDeliveryServices` runs and no other tests or versions: ```diff diff --git a/infrastructure/cdn-in-a-box/traffic_ops_integration_test/run.sh b/infrastructure/cdn-in-a-box/traffic_ops_integration_test/run.sh index d02d048f53..f5f6d4e91e 100755 --- a/infrastructure/cdn-in-a-box/traffic_ops_integration_test/run.sh +++ b/infrastructure/cdn-in-a-box/traffic_ops_integration_test/run.sh @@ -39,11 +39,8 @@ done # if [[ -x ]]; then;./config.sh; done traffic_ops/run-go.sh source config.sh -./traffic_ops_v1_integration_test -test.v -cfg=traffic-ops-test.conf -fixtures=tc-fixtures-v1.json 2>&1 | ./go-junit-report --package-name=golang.test.toapi.v1 --set-exit-code > /junit/golang.test.toapi.v1.xml && find /junit -type 'f' | xargs chmod 664 -export v1=$? -./traffic_ops_v2_integration_test -test.v -cfg=traffic-ops-test.conf -fixtures=tc-fixtures-v2.json 2>&1 | ./go-junit-report --package-name=golang.test.toapi.v2 --set-exit-code > /junit/golang.test.toapi.v2.xml && find /junit -type 'f' | xargs chmod 664 -export v2=$? -./traffic_ops_v3_integration_test -test.v -cfg=traffic-ops-test.conf -fixtures=tc-fixtures-v3.json 2>&1 | ./go-junit-report --package-name=golang.test.toapi.v3 --set-exit-code > /junit/golang.test.toapi.v3.xml && find /junit -type 'f' | xargs chmod 664 +v1=0 v2=0 +./traffic_ops_v3_integration_test -test.v -cfg=traffic-ops-test.conf -fixtures=tc-fixtures-v3.json -test.run 'TestDeliveryServices$' 2>&1 | ./go-junit-report --package-name=golang.test.toapi.v3 --set-exit-code > /junit/golang.test.toapi.v3.xml && find /junit -type 'f' | xargs chmod 664 export v3=$? cat /junit/golang.test.toapi.v1.xml /junit/golang.test.toapi.v2.xml /junit/golang.test.toapi.v3.xml ``` 4. Run the Traffic Ops API tests. ```shell script docker-compose -f docker-compose.traffic-ops-test.yml up --build integration ``` ## Anything else: <!-- e.g. stacktraces, related issues, suggestions how to fix (feel free to delete this section) --> `TestDeliveryServices` passes when f42709effc/#4942 is reverted. `TestDeliveryServices` logs: ```go 2020-10-27T16:34:43.0359708Z === RUN TestDeliveryServices 2020-10-27T16:34:43.0386643Z cdns_test.go:115: Response: {[{cdn was created. success}]} 2020-10-27T16:34:43.0409549Z cdns_test.go:115: Response: {[{cdn was created. success}]} 2020-10-27T16:34:43.0427980Z cdns_test.go:115: Response: {[{cdn was created. success}]} 2020-10-27T16:34:43.0456274Z cdns_test.go:115: Response: {[{cdn was created. success}]} 2020-10-27T16:34:43.0481172Z cdns_test.go:115: Response: {[{cdn was created. success}]} 2020-10-27T16:34:43.0482179Z types_test.go:89: ---- CreateTestTypes ---- 2020-10-27T16:34:43.2465994Z user_test.go:103: Response: {[{user was created. success}]} 2020-10-27T16:34:43.3168356Z user_test.go:103: Response: {[{user was created. success}]} 2020-10-27T16:34:43.3864134Z user_test.go:103: Response: {[{user was created. success}]} 2020-10-27T16:34:43.4589064Z user_test.go:103: Response: {[{user was created. success}]} 2020-10-27T16:34:43.5367775Z user_test.go:103: Response: {[{user was created. success}]} 2020-10-27T16:34:43.6064585Z user_test.go:103: Response: {[{user was created. success}]} 2020-10-27T16:34:43.6787906Z user_test.go:103: Response: {[{user was created. success}]} 2020-10-27T16:34:43.6891195Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.6930987Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.6954343Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.6984720Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7005052Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7026185Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7047237Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7066646Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7085927Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7105460Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7125420Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7146761Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7167639Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7190009Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7212242Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:43.7233758Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:44.3395809Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:44.3403743Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:44.3412517Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:44.3413980Z parameters_test.go:104: Response: {[{param was created. success}]} 2020-10-27T16:34:44.3414843Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3415466Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3416060Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3416743Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3417293Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3417846Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3418393Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3418936Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3419480Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3420017Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3420568Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3476958Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3537653Z profiles_test.go:193: Response: {[{profile was created. success}]} 2020-10-27T16:34:44.3569921Z statuses_test.go:131: Response: {[{status was created. success}]} 2020-10-27T16:34:44.3594761Z statuses_test.go:131: Response: {[{status was created. success}]} 2020-10-27T16:34:44.3614909Z statuses_test.go:131: Response: {[{status was created. success}]} 2020-10-27T16:34:44.3637618Z statuses_test.go:131: Response: {[{status was created. success}]} 2020-10-27T16:34:44.3658269Z statuses_test.go:131: Response: {[{status was created. success}]} 2020-10-27T16:34:44.3681176Z statuses_test.go:131: Response: {[{status was created. success}]} 2020-10-27T16:34:44.3705253Z statuses_test.go:131: Response: {[{status was created. success}]} 2020-10-27T16:34:44.3729298Z divisions_test.go:145: Response: {[{division was created. success}]} 2020-10-27T16:34:44.3752304Z divisions_test.go:145: Response: {[{division was created. success}]} 2020-10-27T16:34:44.3808734Z regions_test.go:119: Response: {[{region was created. success}]} 2020-10-27T16:34:44.3955896Z regions_test.go:119: Response: {[{region was created. success}]} 2020-10-27T16:34:44.3992970Z phys_locations_test.go:120: Response: {[{physLocation was created. success}]} 2020-10-27T16:34:44.4028821Z phys_locations_test.go:120: Response: {[{physLocation was created. success}]} 2020-10-27T16:34:44.4066225Z phys_locations_test.go:120: Response: {[{physLocation was created. success}]} 2020-10-27T16:34:44.6244428Z servers_test.go:367: Response: atlanta-edge-01 {[{Server created success}]} 2020-10-27T16:34:44.6410837Z servers_test.go:367: Response: cdn2-test-edge {[{Server created success}]} 2020-10-27T16:34:44.6657610Z servers_test.go:367: Response: influxdb02 {[{Server created success}]} 2020-10-27T16:34:44.6813793Z servers_test.go:367: Response: atlanta-router-01 {[{Server created success}]} 2020-10-27T16:34:44.6989731Z servers_test.go:367: Response: atlanta-edge-03 {[{Server created success}]} 2020-10-27T16:34:44.7179146Z servers_test.go:367: Response: atlanta-edge-14 {[{Server created success}]} 2020-10-27T16:34:44.7409859Z servers_test.go:367: Response: atlanta-edge-15 {[{Server created success}]} 2020-10-27T16:34:44.7561454Z servers_test.go:367: Response: atlanta-mid-16 {[{Server created success}]} 2020-10-27T16:34:44.7728208Z servers_test.go:367: Response: atlanta-mid-17 {[{Server created success}]} 2020-10-27T16:34:44.7969694Z servers_test.go:367: Response: atlanta-org-1 {[{Server created success}]} 2020-10-27T16:34:44.8141737Z servers_test.go:367: Response: atlanta-org-2 {[{Server created success}]} 2020-10-27T16:34:44.8323592Z servers_test.go:367: Response: atlanta-mid-01 {[{Server created success}]} 2020-10-27T16:34:44.8594584Z servers_test.go:367: Response: rascal01 {[{Server created success}]} 2020-10-27T16:34:44.8764643Z servers_test.go:367: Response: edge1-cdn2 {[{Server created success}]} 2020-10-27T16:34:44.8938706Z servers_test.go:367: Response: trafficvault {[{Server created success}]} 2020-10-27T16:34:44.9181241Z servers_test.go:367: Response: denver-mso-org-01 {[{Server created success}]} 2020-10-27T16:34:44.9347077Z servers_test.go:367: Response: edge1-cdn1-cg3 {[{Server created success}]} 2020-10-27T16:34:44.9530743Z servers_test.go:367: Response: edge2-cdn1-cg3 {[{Server created success}]} 2020-10-27T16:34:44.9802213Z servers_test.go:367: Response: topology-edge-01 {[{Server created success}]} 2020-10-27T16:34:44.9965657Z servers_test.go:367: Response: topology-edge-02 {[{Server created success}]} 2020-10-27T16:34:45.0123722Z servers_test.go:367: Response: topology-mid-04 {[{Server created success}]} 2020-10-27T16:34:45.0385285Z servers_test.go:367: Response: dtrc-mid-01 {[{Server created success}]} 2020-10-27T16:34:45.0549491Z servers_test.go:367: Response: dtrc-mid-02 {[{Server created success}]} 2020-10-27T16:34:45.0724997Z servers_test.go:367: Response: dtrc-mid-03 {[{Server created success}]} 2020-10-27T16:34:45.1017591Z servers_test.go:367: Response: dtrc-edge-01 {[{Server created success}]} 2020-10-27T16:34:45.1184720Z servers_test.go:367: Response: dtrc-edge-02 {[{Server created success}]} 2020-10-27T16:34:45.1349698Z servers_test.go:367: Response: dtrc-edge-03 {[{Server created success}]} 2020-10-27T16:34:45.1587129Z servers_test.go:367: Response: dtrc-edge-04 {[{Server created success}]} 2020-10-27T16:34:45.1752947Z servers_test.go:367: Response: dtrc-edge-05 {[{Server created success}]} 2020-10-27T16:34:45.1918578Z servers_test.go:367: Response: dtrc-edge-06 {[{Server created success}]} 2020-10-27T16:34:45.2210782Z servers_test.go:367: Response: dtrc-edge-07 {[{Server created success}]} 2020-10-27T16:34:45.2371796Z servers_test.go:367: Response: dtrc-edge-08 {[{Server created success}]} 2020-10-27T16:34:45.2544082Z servers_test.go:367: Response: dtrc-mid-04 {[{Server created success}]} 2020-10-27T16:34:45.2779963Z servers_test.go:367: Response: edgeInCachegroup3 {[{Server created success}]} 2020-10-27T16:34:45.2937813Z servers_test.go:367: Response: midInParentCachegroup {[{Server created success}]} 2020-10-27T16:34:45.3099476Z servers_test.go:367: Response: midInSecondaryCachegroup {[{Server created success}]} 2020-10-27T16:34:45.3376107Z servers_test.go:367: Response: edgeInFallback1 {[{Server created success}]} 2020-10-27T16:34:45.3550124Z servers_test.go:367: Response: edgeInFallback2 {[{Server created success}]} 2020-10-27T16:34:45.3729979Z servers_test.go:367: Response: midInParentCachegroup2 {[{Server created success}]} 2020-10-27T16:34:45.3987671Z servers_test.go:367: Response: edgeInTopologyEdgeCg01 {[{Server created success}]} 2020-10-27T16:34:45.4173167Z servers_test.go:367: Response: edgeInTopologyEdgeCg02 {[{Server created success}]} 2020-10-27T16:34:45.4367186Z servers_test.go:367: Response: midInTopologyMidCg01 {[{Server created success}]} 2020-10-27T16:34:45.4537603Z servers_test.go:367: Response: midInTopologyMidCg02 {[{Server created success}]} 2020-10-27T16:34:45.4860598Z servers_test.go:367: Response: midInTopologyMidCg03 {[{Server created success}]} 2020-10-27T16:34:45.4998070Z servers_test.go:367: Response: midInTopologyMidCg04 {[{Server created success}]} 2020-10-27T16:34:45.5168804Z servers_test.go:367: Response: midInTopologyMidCg05 {[{Server created success}]} 2020-10-27T16:34:45.5431577Z servers_test.go:367: Response: midInTopologyMidCg06 {[{Server created success}]} 2020-10-27T16:34:45.5598716Z servers_test.go:367: Response: midInTopologyMidCg07 {[{Server created success}]} 2020-10-27T16:34:45.5676360Z topologies_test.go:57: Response: &{{a multi-site origin topology mso-topology [{0 multiOriginCachegroup [] <nil>} {0 parentCachegroup [0] <nil>} {0 secondaryCachegroup [0] <nil>} {0 cachegroup3 [1 2] <nil>}] <nil>} {[{topology was created. success}]}} 2020-10-27T16:34:45.5757640Z topologies_test.go:57: Response: &{{another topology another-topology [{0 parentCachegroup [] <nil>} {0 cachegroup1 [0] <nil>} {0 secondaryCachegroup [] <nil>} {0 cachegroup2 [2] <nil>}] <nil>} {[{topology was created. success}]}} 2020-10-27T16:34:45.5839807Z topologies_test.go:57: Response: &{{A topology with secondary parents secondary-parents [{0 parentCachegroup [] <nil>} {0 cachegroup1 [0 2] <nil>} {0 secondaryCachegroup [] <nil>} {0 fallback1 [2 0] <nil>} {0 fallback2 [2 0] <nil>}] <nil>} {[{topology was created. success}]}} 2020-10-27T16:34:45.5921548Z topologies_test.go:57: Response: &{{A 4-tier topology 4-tiers [{0 parentCachegroup [] <nil>} {0 parentCachegroup2 [0] <nil>} {0 cachegroup1 [1] <nil>} {0 secondaryCachegroup [1 0] <nil>} {0 fallback1 [3] <nil>}] <nil>} {[{topology was created. success}]}} 2020-10-27T16:34:45.6008996Z topologies_test.go:57: Response: &{{This topology stems from 2 ancestors forked-topology [{0 topology-edge-cg-01 [2] <nil>} {0 topology-edge-cg-02 [6] <nil>} {0 topology-mid-cg-01 [3] <nil>} {0 topology-mid-cg-02 [4] <nil>} {0 topology-mid-cg-03 [5] <nil>} {0 topology-mid-cg-04 [] <nil>} {0 topology-mid-cg-05 [7] <nil>} {0 topology-mid-cg-06 [8] <nil>} {0 topology-mid-cg-07 [] <nil>}] <nil>} {[{topology was created. success}]}} 2020-10-27T16:34:45.6090910Z topologies_test.go:57: Response: &{{a topology top-for-ds-req [{0 dtrc1 [] <nil>} {0 dtrc2 [0] <nil>} {0 dtrc3 [0] <nil>}] <nil>} {[{topology was created. success}]}} 2020-10-27T16:34:45.6169476Z topologies_test.go:57: Response: &{{a topology top-for-ds-req2 [{0 dtrc1 [] <nil>} {0 dtrc2 [0] <nil>}] <nil>} {[{topology was created. success}]}} 2020-10-27T16:34:45.6192502Z servercapabilities_test.go:41: Response: &{{foo 0001-01-01 00:00:00 +0000 UTC} {[{server capability was created. success}]}} 2020-10-27T16:34:45.6224010Z servercapabilities_test.go:41: Response: &{{bar 0001-01-01 00:00:00 +0000 UTC} {[{server capability was created. success}]}} 2020-10-27T16:34:45.6249888Z servercapabilities_test.go:41: Response: &{{ram 0001-01-01 00:00:00 +0000 UTC} {[{server capability was created. success}]}} 2020-10-27T16:34:45.6273119Z servercapabilities_test.go:41: Response: &{{disk 0001-01-01 00:00:00 +0000 UTC} {[{server capability was created. success}]}} 2020-10-27T16:34:45.6295363Z servercapabilities_test.go:41: Response: &{{asdf 0001-01-01 00:00:00 +0000 UTC} {[{server capability was created. success}]}} 2020-10-27T16:34:48.3142410Z deliveryservices_test.go:263: 403 Forbidden[403] - Error requesting Traffic Ops https://127.0.0.1:6443/api/3.0/deliveryservices/410 {"alerts":[{"text":"Forbidden","level":"error"}]} 2020-10-27T16:34:48.3143394Z 2020-10-27T16:34:50.6117683Z types_test.go:208: ---- DeleteTestTypes ---- 2020-10-27T16:34:50.8299039Z --- FAIL: TestDeliveryServices (7.80s) ``` <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 https://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. --> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
