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 2018/10/01 17:18:26 UTC
[GitHub] dangogh opened a new pull request #2894: TO Go: add consistency
test for Nullable vs non-Nullable on go-tc structs
dangogh opened a new pull request #2894: TO Go: add consistency test for Nullable vs non-Nullable on go-tc structs
URL: https://github.com/apache/trafficcontrol/pull/2894
#### What does this PR do?
Tests for inconsistencies in `lib/go-tc` structs between Nullable and non-Nullable versions. The test includes these checks:
- same number of fields
- same names of fields
- same type (ptr for Nullable, non-ptr of same type for non-Nullable)
Fixes #2893
#### Which TC components are affected by this PR?
- [ ] Documentation
- [ ] Grove
- [ ] Traffic Analytics
- [x] Traffic Monitor
- [x] Traffic Ops
- [ ] Traffic Ops ORT
- [ ] Traffic Portal
- [ ] Traffic Router
- [x] Traffic Stats
- [ ] Traffic Vault
- [ ] Other _________
#### What is the best way to verify this PR?
Ensure that this still passes:
```
cd lib/go-tc
go test
```
Ensure that this fails:
```
cd lib/go-tc
go test -tags nullable
```
These tests will not be run unless you specify the `-tags nullable` option on `go test`, so will not cause the unit tests to fail. This is to ensure we have a way to test as the errors are being corrected.
#### Check all that apply
- [x] This PR includes tests
- [ ] This PR includes documentation updates
- [ ] This PR includes an update to CHANGELOG.md
- [x] This PR includes all required license headers
- [ ] This PR includes a database migration (ensure that migration sequence is correct)
- [ ] This PR fixes a serious security flaw. Read more: [www.apache.org/security](http://www.apache.org/security/)
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services