-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VX-166 remove validate function #89
Conversation
src/server/handler_network_test.go
Outdated
@@ -329,12 +329,6 @@ func (suite *NetworkTestSuite) TestListNetwork() { | |||
err = json.Unmarshal(httpWriter.Body.Bytes(), &retNetworks) | |||
suite.NoError(err) | |||
suite.Equal(tc.expectSize, len(retNetworks)) | |||
for i, v := range retNetworks { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without those test, how did you make sure you get what you store ?
src/server/handler_network.go
Outdated
|
||
networkProvider, err := np.GetNetworkProvider(&network) | ||
if err != nil { | ||
if err := entity.ValidateVLANTags(network.VLANTags); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我認為我們不應該再 restful handler 這邊有太多網路邏輯的檢查,這部分應該都是後端實作去檢查。
這種情況下,只要未來後端網路有任何更動,你都需要更改 restful handler, 我們應該只要專注於後端網路本身的實作修改就好。
Codecov Report
@@ Coverage Diff @@
## develop #89 +/- ##
===========================================
- Coverage 71.05% 70.41% -0.64%
===========================================
Files 32 32
Lines 1247 1217 -30
===========================================
- Hits 886 857 -29
- Misses 307 308 +1
+ Partials 54 52 -2
Continue to review full report at Codecov.
|
…and type checking
a1c1f65
to
a13bece
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
VX-166 remove validate function Former-commit-id: dd91b313a1757e62b9f778e1ebe427c518297060 [formerly c2d1b1b] Former-commit-id: cf7af7d9931f360a38b6fe8129e8b46a88fd9a7d
VX-166 remove validate function
No description provided.