rob05c commented on a change in pull request #3163: Fix Traffic Ops Tenancy and 
Activity Bugs, Fix TO API Test Framework to work with Tenancy
URL: https://github.com/apache/trafficcontrol/pull/3163#discussion_r244462785
 
 

 ##########
 File path: traffic_ops/testing/api/v14/user_test.go
 ##########
 @@ -61,11 +63,10 @@ func CreateTestUsers(t *testing.T) {
        for _, user := range testData.Users {
 
                resp, _, err := TOSession.CreateUser(&user)
-               log.Debugln("Response: ", resp.Alerts)
-
                if err != nil {
-                       t.Errorf("could not CREATE user: %v\n", err)
+                       t.Fatalf("could not CREATE user: %v\n", err)
 
 Review comment:
   Actually, thinking about this some more, I think we should use `Fatalf` 
anywhere the test can't continue, irrespective of `defer` cleanups attempts. 
   
   There are always going to be cases where "delete" can't clean up 
appropriately, after a test fails at some point. Test errors are just like 
compile errors: you should only ever consider the first failure. Because any 
one failure can cause a chain of other unrelated failures, or worse, false 
successes. Any one test failure is a failure of the entire test suite. 
   
   The only right answer is to only consider the first failure, and cleanup is 
irrelevant, because all subsequent tests, pass or fail, are invalid.
   
   This means all build pipelines (and people) should be using `go test 
-failfast`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to