package main import ( "strings" "testing" ) func TestUserdataMountDataContainsOnlyExt4Options(t *testing.T) { for _, option := range strings.Split(userdataMountData, ",") { switch option { case "rw", "ro", "noatime", "nodev", "nosuid", "noexec": t.Fatalf("generic mount option %q must be represented by mount flags", option) } } if userdataMountData != "errors=remount-ro" { t.Fatalf("userdata mount data = %q, want ext4 error policy only", userdataMountData) } }