cli: add filebytes parameter type

This commit is contained in:
Anna Shaleva 2021-02-18 18:13:03 +03:00
parent fe918e28f2
commit 488e75a246
6 changed files with 34 additions and 9 deletions

View file

@ -481,6 +481,12 @@ func TestNewParameterFromString(t *testing.T) {
}, {
in: `Map:[]`,
err: true,
}, {
in: "filebytes:./testdata/adjustValToType_filebytes_good.txt",
out: Parameter{Type: ByteArrayType, Value: []byte{0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x65, 0x66}},
}, {
in: "filebytes:./testdata/does_not_exists.txt",
err: true,
}}
for _, inout := range inouts {
out, err := NewParameterFromString(inout.in)