1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
package convert
import (
"testing"
"gotest.tools/v3/assert"
)
func TestTmpfsOptionsToGRPC(t *testing.T) {
options := [][]string{
{"noexec"},
{"uid", "12345"},
}
expected := `[["noexec"],["uid","12345"]]`
actual := tmpfsOptionsToGRPC(options)
assert.Equal(t, expected, actual)
}
func TestTmpfsOptionsFromGRPC(t *testing.T) {
options := `[["noexec"],["uid","12345"]]`
expected := [][]string{
{"noexec"},
{"uid", "12345"},
}
actual := tmpfsOptionsFromGRPC(options)
assert.DeepEqual(t, expected, actual)
}
|