Skip to content

Commit

Permalink
add TestDnf
Browse files Browse the repository at this point in the history
  • Loading branch information
mycrEEpy committed Dec 26, 2024
1 parent 674bd2f commit 05cbf16
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion internal/pakku/pakku_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,30 @@ func mustReadAll(reader io.Reader) []byte {

func TestApt(t *testing.T) {
req := testcontainers.ContainerRequest{
Image: "public.ecr.aws/docker/library/debian:12",
Image: "debian:12",
Entrypoint: []string{"bash", "-c", "echo ready && sleep 60"},
Files: []testcontainers.ContainerFile{pakkuFile},
WaitingFor: wait.ForLog("ready"),
}

container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
ContainerRequest: req,
Started: true,
})
defer testcontainers.CleanupContainer(t, container)
require.NoError(t, err)

mustSucceed(t, container, []string{"pakku", "init"})
mustSucceed(t, container, []string{"pakku", "config"})
mustSucceed(t, container, []string{"pakku", "add", "apt", "vim"})
mustSucceed(t, container, []string{"pakku", "apply"})
mustSucceed(t, container, []string{"pakku", "update"})
mustSucceed(t, container, []string{"pakku", "remove", "apt", "vim"})
}

func TestDnf(t *testing.T) {
req := testcontainers.ContainerRequest{
Image: "fedora:41",
Entrypoint: []string{"bash", "-c", "echo ready && sleep 60"},
Files: []testcontainers.ContainerFile{pakkuFile},
WaitingFor: wait.ForLog("ready"),
Expand Down

0 comments on commit 05cbf16

Please sign in to comment.