-
Notifications
You must be signed in to change notification settings - Fork 95
Add test #794: make sure volume creation is successful #863
Add test #794: make sure volume creation is successful #863
Conversation
1e34fd1
to
4e11204
Compare
@@ -0,0 +1,53 @@ | |||
// This test is going to create volume on the fresh testbed very first time. |
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.
Copy the license
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.
Sure I will add that part to all newly added files.
eac6c21
to
30001d0
Compare
|
||
// This helper method is going to create vsphere docker volume with | ||
// defaults and verifies as well | ||
func CreateDefaultVolumeAndVerify (ip string, name string) ([]byte, error, bool) { |
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.
Other than logging what is the verification done here? Why are there 2 methods that only differ in logging?
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.
one of the method simply creates volume and returns control to testcase to process error whether fails the testcase or ignores the error occurred while executing request.
CreateDefaultVolumeAndVerify
processed the err field and on that basis it returns bool for testcase to proceed further.
…d automatically Add test: make sure volume creation is successful and pvscsci is added automatically Add test: make sure volume creation is successful and pvscsci is added automatically improving logging statement restarting CI run kicking CI run again changing the order of test target execution Addressing Ritesh's comment: copying licence Removing references of PVSCSI (addressing Ritesh's comment) Removing unused helper method and simplified test code (Addressing Ritesh's comment) Simplifying delete method
aee2c1b
to
fce4625
Compare
|
||
fmt.Printf("\ncreating volume [%s] on VM[%s]", name, ip) | ||
|
||
return exec.Command("/usr/bin/ssh", strings.Split(os.Getenv("SSH_KEY_OPT"), " ")[0], strings.Split(os.Getenv("SSH_KEY_OPT"), " ")[1], "-q", "-kTax", "-o StrictHostKeyChecking=no", "root@"+ip, "docker volume create --driver=vmdk --name="+name).CombinedOutput() |
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.
Going forward can you define the params to SSH so that they can be reused. You can do this in a separate PR.
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.
Sure, I will address this comment in the separate PR.
Thanks for the review!
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.
Proposing the code change with #872
This PR is going to add test case for #794. Please refer #794 for the automated steps.
In this PR:
timestamp
sample testcase
(no longer needed)Testing done: yes