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 2022/07/15 15:43:53 UTC

[GitHub] [trafficcontrol] rawlinp commented on a diff in pull request #6954: Refactor Static DNS Entries Tests

rawlinp commented on code in PR #6954:
URL: https://github.com/apache/trafficcontrol/pull/6954#discussion_r922289652


##########
traffic_ops/testing/api/v4/cdn_locks_test.go:
##########
@@ -487,6 +555,33 @@ func TestCDNLocks(t *testing.T) {
 								}
 							})
 						}
+					case "STATIC DNS ENTRIES POST":
+						{
+							t.Run(name, func(t *testing.T) {
+								alerts, reqInf, err := testCase.ClientSession.CreateStaticDNSEntry(staticDNSEntry, testCase.RequestOpts)
+								for _, check := range testCase.Expectations {
+									check(t, reqInf, nil, alerts, err)
+								}
+							})
+						}
+					case "STATIC DNS ENTRIES PUT":
+						{
+							t.Run(name, func(t *testing.T) {
+								alerts, reqInf, err := testCase.ClientSession.UpdateStaticDNSEntry(testCase.EndpointId(), staticDNSEntry, testCase.RequestOpts)
+								for _, check := range testCase.Expectations {
+									check(t, reqInf, nil, alerts, err)
+								}
+							})
+						}
+					case "STATIC DNS ENTRIES DELETE":

Review Comment:
   nit: would it make sense to include `default` switch cases that fail the test? That way we are less prone to typos sneaking in and causing the tests to not actually be run.



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

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org