blob: e9c2666f38b047d52aa858064f46d5f3e0d752b0 [file] [edit]
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)
}