ocket8888 commented on issue #4374: Create API v2 tests
URL: https://github.com/apache/trafficcontrol/pull/4374#issuecomment-590996762
 
 
   Really? cuz I'm getting tons of failures:
   ```
   servercapabilities_test.go:36: could not CREATE server capability: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/server_capabilities 
{"alerts":[{"text":"server_capability name 'foo' already 
exists.","level":"error"}]}
   servercapabilities_test.go:38: Response:  <nil>
   servercapabilities_test.go:36: could not CREATE server capability: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/server_capabilities 
{"alerts":[{"text":"server_capability name 'bar' already 
exists.","level":"error"}]}
   servercapabilities_test.go:38: Response:  <nil>
   --- FAIL: 
TestDeliveryServiceServersWithRequiredCapabilities/assign_a_deliveryservice_to_a_required_capability;_deliveryServiceID:_0,_requiredCapability:_foo
 (0.01s)
        deliveryservices_required_capabilities_test.go:156: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/deliveryservices_required_capabilities 
{"alerts":[{"text":"Invalid DS type. Only DNS and HTTP delivery services can 
have required capabilities","level":"error"}]}
   --- FAIL: 
TestDeliveryServiceServersWithRequiredCapabilities/assign_a_deliveryservice_to_a_required_capability;_deliveryServiceID:_0,_requiredCapability:_bar
 (0.01s)
        deliveryservices_required_capabilities_test.go:156: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/deliveryservices_required_capabilities 
{"alerts":[{"text":"Invalid DS type. Only DNS and HTTP delivery services can 
have required capabilities","level":"error"}]}
   --- FAIL: 
TestDeliveryServiceServersWithRequiredCapabilities/assign_a_deliveryservice_to_a_required_capability;_deliveryServiceID:_0,_requiredCapability:_bar#01
 (0.01s)
        deliveryservices_required_capabilities_test.go:156: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/deliveryservices_required_capabilities 
{"alerts":[{"text":"Invalid DS type. Only DNS and HTTP delivery services can 
have required capabilities","level":"error"}]}
   serverservercapability_test.go:49: Response:  atlanta-org-1   {[{server 
server_capability was created. success}]}
   serverservercapability_test.go:49: Response:  atlanta-org-2   {[{server 
server_capability was created. success}]}
   --- FAIL: 
TestDeliveryServiceServersWithRequiredCapabilities/missing_requirements_for_server_->_DS_assignment
 (0.01s)
        deliveryserviceservers_test.go:83: *POST delivery service required 
capability: 400 Bad Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/deliveryservices_required_capabilities 
{"alerts":[{"text":"Invalid DS type. Only DNS and HTTP delivery services can 
have required capabilities","level":"error"}]}
   --- FAIL: 
TestDeliveryServiceServersWithRequiredCapabilities/successful_server_->_DS_assignment
 (0.01s)
        deliveryserviceservers_test.go:83: *POST delivery service required 
capability: 400 Bad Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/deliveryservices_required_capabilities 
{"alerts":[{"text":"Invalid DS type. Only DNS and HTTP delivery services can 
have required capabilities","level":"error"}]}
   deliveryserviceservers_test.go:112: no delivery service required capabilites 
found for ds msods1
   serverservercapability_test.go:184: at least one delivery service needs the 
capability foo required
   deliveryservices_required_capabilities_test.go:260: no delivery services 
returned
   servercapabilities_test.go:75: cannot DELETE server capability: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/server_capabilities?name=foo 
{"alerts":[{"text":"cannot delete server_capability because it is being used by 
a server_server_capability","level":"error"}]}
         - {[]}
   servercapabilities_test.go:80: expected error trying to GET deleted server 
capability: foo, actual: nil
   servercapabilities_test.go:83: expected nil trying to GET deleted server 
capability: foo, actual: non-nil
   servercapabilities_test.go:75: cannot DELETE server capability: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/server_capabilities?name=bar 
{"alerts":[{"text":"cannot delete server_capability because it is being used by 
a server_server_capability","level":"error"}]}
         - {[]}
   servercapabilities_test.go:80: expected error trying to GET deleted server 
capability: bar, actual: nil
   servercapabilities_test.go:83: expected nil trying to GET deleted server 
capability: bar, actual: non-nil
   --- FAIL: 
TestDeliveryServicesRequiredCapabilities/assign_a_deliveryservice_to_a_required_capability;_deliveryServiceID:_0,_requiredCapability:_foo
 (0.01s)
        deliveryservices_required_capabilities_test.go:156: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/deliveryservices_required_capabilities 
{"alerts":[{"text":"Invalid DS type. Only DNS and HTTP delivery services can 
have required capabilities","level":"error"}]}
   --- FAIL: 
TestDeliveryServicesRequiredCapabilities/assign_a_deliveryservice_to_a_required_capability;_deliveryServiceID:_0,_requiredCapability:_bar
 (0.01s)
        deliveryservices_required_capabilities_test.go:156: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/deliveryservices_required_capabilities 
{"alerts":[{"text":"Invalid DS type. Only DNS and HTTP delivery services can 
have required capabilities","level":"error"}]}
   --- FAIL: 
TestDeliveryServicesRequiredCapabilities/assign_a_deliveryservice_to_a_required_capability;_deliveryServiceID:_0,_requiredCapability:_bar#01
 (0.01s)
        deliveryservices_required_capabilities_test.go:156: 400 Bad 
Request[400] - Error requesting Traffic Ops 
https://localhost:6443/api/2.0/deliveryservices_required_capabilities 
{"alerts":[{"text":"Invalid DS type. Only DNS and HTTP delivery services can 
have required capabilities","level":"error"}]}
   deliveryservices_required_capabilities_test.go:180: delivery service ds1 
needs at least one capability required
   deliveryservices_required_capabilities_test.go:260: no delivery services 
returned
   ```
   Are you sure your `docker-compose.traffic-ops-test.yml` is running API v2 
tests?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to