MylesBock commented on a change in pull request #5314:
URL: https://github.com/apache/trafficcontrol/pull/5314#discussion_r527846232



##########
File path: traffic_ops/traffic_ops_golang/region/regions_test.go
##########
@@ -109,3 +108,30 @@ func TestInterfaces(t *testing.T) {
                t.Errorf("Region must be Identifier")
        }
 }
+func TestValidation(t *testing.T) {
+       testRegion := tc.Region{
+               DivisionName: "west",
+               ID:           1,
+               Name:         "region1",
+               LastUpdated:  tc.TimeNoMod{Time: time.Now()},
+       }
+       testTORegion := TORegion{Region: testRegion}
+       errs := test.SortErrors(test.SplitErrors(testTORegion.Validate()))
+
+       if len(errs) > 0 {
+               t.Errorf(`expected no errors,  got %v`, errs)

Review comment:
       Yes, had changes to do that but pivoted because it was pretty late
   
   Test fixture updated to include a division, error message updated




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


Reply via email to