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

Unit tests and update to quickstart guide #354

Merged
merged 26 commits into from
Aug 5, 2019

Conversation

nicklesimba
Copy link
Collaborator

Added additional unit tests and added a stub section for Network Status Annotations in quickstart.md

@coveralls
Copy link

coveralls commented Aug 1, 2019

Pull Request Test Coverage Report for Build 835

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+7.7%) to 71.089%

Totals Coverage Status
Change from base Build 833: 7.7%
Covered Lines: 927
Relevant Lines: 1304

💛 - Coveralls

Copy link
Member

@s1061123 s1061123 left a comment

Choose a reason for hiding this comment

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

Thank you for this PR! It must increase the code coverage, awesome!

I add some minor comment, so could you please take a look into it?
Once changed, let's merge it.

Expect(err).NotTo(HaveOccurred())
})

/* Still figuring this one out. need to make "setPodNetworkAnnotation throw an error */
Copy link
Member

Choose a reason for hiding this comment

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

Golang prefers to use '//' than '/* */' for comments. Could you please change it?

}
}`

delegate, err := types.LoadDelegateNetConf([]byte(conf), nil, "0000:00:00.0")
Copy link
Member

Choose a reason for hiding this comment

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

In case of non-sriov case, 3rd argument of LoadDelegateNetConf() could be "" (empty) instead of "0000:00:00.0".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed this in my most recent commit, but I'm not sure what "non-sriov case" means. Can you explain so I will know where/why such changes should be made for future? Thank you

@@ -115,6 +115,15 @@ var _ = Describe("Kubelet resource endpoint data read operations", func() {
_, err := GetResourceClient()
Expect(err).NotTo(HaveOccurred())
})

It("should fail with missing file", func() {
// os.Mkdir("tempdir", 0644)
Copy link
Member

Choose a reason for hiding this comment

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

Could you remove commented out code (if it is not necessary)?


It("should fail with missing file", func() {
// os.Mkdir("tempdir", 0644)
kubeletSocket = "Andrew Bays"
Copy link
Member

Choose a reason for hiding this comment

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

Good example to us but not so universal 😆 We may use simple string for that, like "sampleSocketString".

@dougbtv dougbtv merged commit 9085c84 into k8snetworkplumbingwg:master Aug 5, 2019
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