Skip to content

Commit

Permalink
Merge pull request #120 from yitsushi/fix-test
Browse files Browse the repository at this point in the history
fix infrastructure/containerd integration tests
  • Loading branch information
richardcase authored Oct 7, 2021
2 parents c253ba6 + d4c9810 commit 7b5ff28
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion infrastructure/containerd/image_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,16 @@ func TestImageService_Integration(t *testing.T) {
Expect(len(leases)).To(Equal(1))
Expect(leases[0].ID).To(Equal(expectedLeaseName), "expect lease with name %s to exists", expectedLeaseName)

inputGet.ImageName = "docker.io/linuxkit/kernel:5.4.129"
inputGet.ImageName = testImageKernel

err = imageSvc.Pull(ctx, inputGet)
Expect(err).NotTo(HaveOccurred())

err = client.ImageService().Delete(namespaceCtx, testImageKernel)
Expect(err).NotTo(HaveOccurred())

err = client.ImageService().Delete(namespaceCtx, testImageVolume)
Expect(err).NotTo(HaveOccurred())
}

func testCreateClient(t *testing.T) (*ctr.Client, context.Context) {
Expand Down
3 changes: 3 additions & 0 deletions infrastructure/containerd/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ func TestMicroVMRepo_Integration_MultipleSave(t *testing.T) {
Expect(err).NotTo(HaveOccurred())
Expect(savedVM).NotTo(BeNil())
Expect(savedVM.Version).To(Equal(2))

err = repo.Delete(ctx, testVm)
Expect(err).NotTo(HaveOccurred())
}

func makeSpec(name, ns string) *models.MicroVM {
Expand Down

0 comments on commit 7b5ff28

Please sign in to comment.