mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
Merge pull request #6002 from lsm5/fix-specgen-in-bindings-test
Fix NewSpecGenerator args in pkg/bindings/test
This commit is contained in:
@ -3,13 +3,13 @@ package test_bindings
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/containers/libpod/libpod/define"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/containers/libpod/libpod/define"
|
||||||
. "github.com/containers/libpod/pkg/bindings"
|
. "github.com/containers/libpod/pkg/bindings"
|
||||||
"github.com/containers/libpod/pkg/bindings/containers"
|
"github.com/containers/libpod/pkg/bindings/containers"
|
||||||
"github.com/containers/libpod/pkg/specgen"
|
"github.com/containers/libpod/pkg/specgen"
|
||||||
@ -189,7 +189,7 @@ func (b *bindingTest) restoreImageFromCache(i testImage) {
|
|||||||
// Run a container within or without a pod
|
// Run a container within or without a pod
|
||||||
// and add or append the alpine image to it
|
// and add or append the alpine image to it
|
||||||
func (b *bindingTest) RunTopContainer(containerName *string, insidePod *bool, podName *string) (string, error) {
|
func (b *bindingTest) RunTopContainer(containerName *string, insidePod *bool, podName *string) (string, error) {
|
||||||
s := specgen.NewSpecGenerator(alpine.name)
|
s := specgen.NewSpecGenerator(alpine.name, false)
|
||||||
s.Terminal = false
|
s.Terminal = false
|
||||||
s.Command = []string{"top"}
|
s.Command = []string{"top"}
|
||||||
if containerName != nil {
|
if containerName != nil {
|
||||||
|
@ -360,7 +360,7 @@ var _ = Describe("Podman containers ", func() {
|
|||||||
|
|
||||||
It("logging", func() {
|
It("logging", func() {
|
||||||
stdoutChan := make(chan string, 10)
|
stdoutChan := make(chan string, 10)
|
||||||
s := specgen.NewSpecGenerator(alpine.name)
|
s := specgen.NewSpecGenerator(alpine.name, false)
|
||||||
s.Terminal = true
|
s.Terminal = true
|
||||||
s.Command = []string{"date", "-R"}
|
s.Command = []string{"date", "-R"}
|
||||||
r, err := containers.CreateWithSpec(bt.conn, s)
|
r, err := containers.CreateWithSpec(bt.conn, s)
|
||||||
@ -521,7 +521,7 @@ var _ = Describe("Podman containers ", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("container init", func() {
|
It("container init", func() {
|
||||||
s := specgen.NewSpecGenerator(alpine.name)
|
s := specgen.NewSpecGenerator(alpine.name, false)
|
||||||
ctr, err := containers.CreateWithSpec(bt.conn, s)
|
ctr, err := containers.CreateWithSpec(bt.conn, s)
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
err = containers.ContainerInit(bt.conn, ctr.ID)
|
err = containers.ContainerInit(bt.conn, ctr.ID)
|
||||||
|
@ -31,7 +31,7 @@ var _ = Describe("Create containers ", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("create a container running top", func() {
|
It("create a container running top", func() {
|
||||||
s := specgen.NewSpecGenerator(alpine.name)
|
s := specgen.NewSpecGenerator(alpine.name, false)
|
||||||
s.Command = []string{"top"}
|
s.Command = []string{"top"}
|
||||||
s.Terminal = true
|
s.Terminal = true
|
||||||
s.Name = "top"
|
s.Name = "top"
|
||||||
|
@ -45,7 +45,7 @@ var _ = Describe("Podman info", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman info container counts", func() {
|
It("podman info container counts", func() {
|
||||||
s := specgen.NewSpecGenerator(alpine.name)
|
s := specgen.NewSpecGenerator(alpine.name, false)
|
||||||
_, err := containers.CreateWithSpec(bt.conn, s)
|
_, err := containers.CreateWithSpec(bt.conn, s)
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user