-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add end to end tests #51
Conversation
c0a6aa0
to
f722b3c
Compare
This PR add end to end testing. We use github action CI called end to end, which is executed in every PR. Github CI's ubuntu now support KVM, so tests are quite fast. The process is: setup kind and libvirt Deploy vCsim, which is used has vcenter Deploy registry where we push agent container Build container of agent and push it to registry Build container of agent-service and deploy it on kind run tests The tests are using ginkgo. There are few helper methods implemented to help manage VM and sources. The first end to end test flow: Before each test: Create source Download OVA image & extract it Run libvirt VM using the ISO from OVA Wait for VM IP Wait for planner-agent service to be running Test flow: Send the vCenter credentials to agent Wait until the source is reporting the up-to-date state Signed-off-by: Ondra Machacek <[email protected]>
@@ -0,0 +1,20 @@ | |||
# Running integration tests |
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.
👍
sourceId, err = svc.Create("testsource") | ||
Expect(err).To(BeNil()) | ||
Expect(sourceId).ToNot(BeNil()) | ||
err = agent.Run(sourceId) |
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.
Greate work!
I see that agent.Run creates a n agent VM but I can't find where do we remove it?
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.
In AfterEach method we call 'agent.Remove()' that will remove the VM
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.
Great work!!
I had one comment
This PR add end to end testing.
We use github action CI called
end to end
, which is executed in every PR.Github CI's ubuntu now support KVM, so tests are quite fast.
The process is:
The tests are using ginkgo. There are few helper methods implemented to help manage VM and sources.
The first end to end test flow:
Before each test:
planner-agent
service to be runningTest flow:
After each test:
If failed:
See the test run: https://github.com/kubev2v/migration-planner/actions/runs/11531405152/job/32102064538?pr=51