grim/convey
Clone
Summary
Browse
Changes
Graph
proofreading of documentation
2022-04-10, ivanhoe
6568ae3e734f
proofreading of documentation
Reviewed at https://reviews.imfreedom.org/r/1375/
package
docker
import
(
"testing"
"github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
"keep.imfreedom.org/grim/convey/yaml"
)
func
TestRemoveImage
(
t
*
testing
.
T
)
{
r
:=
&
Remove
{
Image
:
"foo"
,
}
assert
.
NoError
(
t
,
r
.
Valid
())
}
func
TestRemoveImages
(
t
*
testing
.
T
)
{
r
:=
&
Remove
{
Images
:
[]
string
{
"foo"
,
"bar"
},
}
assert
.
NoError
(
t
,
r
.
Valid
())
}
func
TestRemoveMerge
(
t
*
testing
.
T
)
{
r
:=
&
Remove
{
Image
:
"foo"
,
Images
:
[]
string
{
"bar"
,
"baz"
},
}
assert
.
NoError
(
t
,
r
.
Valid
())
assert
.
Equal
(
t
,
r
.
Images
,
yaml
.
StringOrSlice
{
"foo"
,
"bar"
,
"baz"
})
}
func
TestRemoveImagesRequired
(
t
*
testing
.
T
)
{
r
:=
&
Remove
{}
assert
.
ErrorIs
(
t
,
r
.
Valid
(),
podman
.
ErrNoTags
)
}