Skip to content
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

Merged
merged 1 commit into from
Jul 13, 2018
Merged

Conversation

John-Lin
Copy link
Contributor

No description provided.

@@ -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 {
Copy link
Contributor

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 ?


networkProvider, err := np.GetNetworkProvider(&network)
if err != nil {
if err := entity.ValidateVLANTags(network.VLANTags); err != nil {
Copy link
Contributor

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-io
Copy link

codecov-io commented Jul 13, 2018

Codecov Report

Merging #89 into develop will decrease coverage by 0.63%.
The diff coverage is 60%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ
src/networkprovider/network.go 100% <ø> (ø) ⬆️
src/networkprovider/ovs_system.go 77.77% <ø> (+0.85%) ⬆️
src/networkprovider/fake.go 100% <ø> (ø) ⬆️
src/networkprovider/ovs_netdev.go 62.26% <50%> (-6.97%) ⬇️
src/server/handler_network.go 81.73% <62.5%> (-2.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed661fd...a13bece. Read the comment docs.

@John-Lin John-Lin force-pushed the johnlin/remove-validate branch from a1c1f65 to a13bece Compare July 13, 2018 04:42
@John-Lin John-Lin changed the title remove validate function VX-166 remove validate function Jul 13, 2018
Copy link
Contributor

@hwchiu hwchiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@John-Lin John-Lin merged commit c2d1b1b into develop Jul 13, 2018
@hwchiu hwchiu deleted the johnlin/remove-validate branch July 13, 2018 10:29
John-Lin added a commit that referenced this pull request Jul 25, 2018
VX-166 remove validate function

Former-commit-id: dd91b313a1757e62b9f778e1ebe427c518297060 [formerly c2d1b1b]
Former-commit-id: cf7af7d9931f360a38b6fe8129e8b46a88fd9a7d
John-Lin added a commit that referenced this pull request Jul 25, 2018
VX-166 remove validate function

Former-commit-id: dd91b313a1757e62b9f778e1ebe427c518297060 [formerly dd91b313a1757e62b9f778e1ebe427c518297060 [formerly c2d1b1b]]
Former-commit-id: cf7af7d9931f360a38b6fe8129e8b46a88fd9a7d
Former-commit-id: b7bd8f6
John-Lin added a commit that referenced this pull request Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants