grim/convey

Add back the old --memory flag

2021-12-22, Gary Kramlich
aa8a9d2b2ae2
Add back the old --memory flag
package docker
import (
"testing"
"github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
"keep.imfreedom.org/grim/convey/yaml"
)
func TestPushImage(t *testing.T) {
p := &Push{
Image: "foo",
}
assert.NoError(t, p.Valid())
}
func TestPushImages(t *testing.T) {
p := &Push{
Images: []string{"foo", "bar"},
}
assert.NoError(t, p.Valid())
}
func TestPushImagesMerged(t *testing.T) {
p := &Push{
Image: "foo",
Images: []string{"bar"},
}
assert.NoError(t, p.Valid())
assert.Equal(t, p.Images, yaml.StringOrSlice{"foo", "bar"})
}
func TestPushImageRequired(t *testing.T) {
p := &Push{}
assert.ErrorIs(t, p.Valid(), podman.ErrNoTags)
}