grim/convey
Clone
Summary
Browse
Changes
Graph
Clean up error handling the script/shell and add some unit tests
2021-12-22, Gary Kramlich
6b705973e673
Clean up error handling the script/shell and add some unit tests
package
docker
import
(
"testing"
"github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/tasks"
)
func
TestExport
(
t
*
testing
.
T
)
{
e
:=
&
Export
{
Files
:
[]
string
{
".:."
},
}
assert
.
NoError
(
t
,
e
.
Valid
())
}
func
TestExportFilesRequired
(
t
*
testing
.
T
)
{
e
:=
&
Export
{}
assert
.
ErrorIs
(
t
,
e
.
Valid
(),
tasks
.
ErrNoFiles
)
}