grim/convey

Parents 442f0f724fce
Children c4308135930b
clean up an test that was depending on a file when it's easier to just dump it in the test itself.
--- a/docker/data/aws-ecr-get-login.txt Sun Oct 27 03:33:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-docker login -u AWS -p password -e none https://1234567890.dkr.ecr.us-east-2.amazonaws.com
--- a/docker/parser_test.go Sun Oct 27 03:33:57 2019 -0500
+++ b/docker/parser_test.go Sun Oct 27 03:41:33 2019 -0500
@@ -17,20 +17,14 @@
package docker
import (
- "io/ioutil"
+ "strings"
"testing"
- "github.com/kballard/go-shellquote"
"github.com/stretchr/testify/assert"
)
func TestECRGetLogin(t *testing.T) {
- data, err := ioutil.ReadFile("data/aws-ecr-get-login.txt")
- assert.Nil(t, err)
-
- // shell split the data from the file
- argv, err := shellquote.Split(string(data))
- assert.Nil(t, err)
+ argv := strings.Split("docker login -u AWS -p password -e none https://1234567890.dkr.ecr.us-east-2.amazonaws.com", " ")
task, err := ParseCommand(argv)
assert.Nil(t, err)