diff options
Diffstat (limited to 'hotline/access_test.go')
| -rw-r--r-- | hotline/access_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hotline/access_test.go b/hotline/access_test.go index 2c5b8f4..65d29be 100644 --- a/hotline/access_test.go +++ b/hotline/access_test.go @@ -75,6 +75,16 @@ func Test_accessBitmap_UnmarshalYAML(t *testing.T) { wantErr: false, }, { + name: "legacy array with non-int element returns error", + yamlData: `access: [96, "nope", 12, 32, 3, 128, 0, 0]`, + wantErr: true, + }, + { + name: "legacy array with too many elements returns error", + yamlData: "access: [1, 2, 3, 4, 5, 6, 7, 8, 9]", + wantErr: true, + }, + { name: "unmarshal map format with true values", yamlData: `access: DownloadFile: true |