Skip to content

Commit

Permalink
tests: Add yum to package_manager tests
Browse files Browse the repository at this point in the history
This will check that is possible to perform a yum update inside a container.

Fixes kata-containers#65

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
  • Loading branch information
GabyCT committed Apr 24, 2018
1 parent 80441c5 commit 086acfa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const (

// FedoraImage is the fedora image
FedoraImage = "fedora"

// CentosImage is the centos image
CentosImage = "centos"
)

func runDockerCommandWithTimeout(timeout time.Duration, command string, args ...string) (string, string, int) {
Expand Down
1 change: 1 addition & 0 deletions integration/docker/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func TestIntegration(t *testing.T) {
PostgresImage,
DebianImage,
FedoraImage,
CentosImage,
}

for _, i := range images {
Expand Down
8 changes: 8 additions & 0 deletions integration/docker/package_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,12 @@ var _ = Describe("package manager update test", func() {
Expect(RemoveDockerContainer(id)).To(BeTrue())
})
})

Context("check yum update", func() {
It("should not fail", func() {
args = append(args, "--rm", "--name", id, CentosImage, "yum", "-y", "update")
_, _, exitCode := dockerRun(args...)
Expect(exitCode).To(BeZero())
})
})
})

0 comments on commit 086acfa

Please sign in to comment.