You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/01/07 17:46:59 UTC

[GitHub] [trafficcontrol] rawlinp commented on a change in pull request #5406: Add TO validation to ensure a parent.config weight parameter is a float

rawlinp commented on a change in pull request #5406:
URL: https://github.com/apache/trafficcontrol/pull/5406#discussion_r553484337



##########
File path: traffic_ops/testing/api/v3/withobjs_test.go
##########
@@ -32,9 +32,15 @@ func WithObjs(t *testing.T, objs []TCObj, f func()) {
 			withFuncs[obj].Delete(t)
 		}
 	}()
-	for _, obj := range objs {
+	var obj TCObj
+	for _, obj = range objs {
 		withFuncs[obj].Create(t)
 	}
+
+	if _, exists := withNegativeFuncs[obj]; exists {

Review comment:
       Do we really need a new negative fixtures json file and all this extra `WithObjs` stuff that goes with it? It seems like unnecessary complexity when negative test data has always been defined in the tests themselves.




----------------------------------------------------------------
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:
users@infra.apache.org