-------------------------------------------------------------------
(t *testing.T)
| 923 | // ------------------------------------------------------------------- |
| 924 | |
| 925 | func TestCollectionDelete(t *testing.T) { |
| 926 | t.Parallel() |
| 927 | |
| 928 | scenarios := []struct { |
| 929 | name string |
| 930 | collection string |
| 931 | disableIntegrityChecks bool |
| 932 | expectError bool |
| 933 | }{ |
| 934 | { |
| 935 | name: "unsaved", |
| 936 | collection: "", |
| 937 | expectError: true, |
| 938 | }, |
| 939 | { |
| 940 | name: "system", |
| 941 | collection: core.CollectionNameSuperusers, |
| 942 | expectError: true, |
| 943 | }, |
| 944 | { |
| 945 | name: "base with references", |
| 946 | collection: "demo1", |
| 947 | expectError: true, |
| 948 | }, |
| 949 | { |
| 950 | name: "base with references with disabled integrity checks", |
| 951 | collection: "demo1", |
| 952 | disableIntegrityChecks: true, |
| 953 | expectError: false, |
| 954 | }, |
| 955 | { |
| 956 | name: "base without references", |
| 957 | collection: "demo1", |
| 958 | expectError: true, |
| 959 | }, |
| 960 | { |
| 961 | name: "view with reference", |
| 962 | collection: "view1", |
| 963 | expectError: true, |
| 964 | }, |
| 965 | { |
| 966 | name: "view with references with disabled integrity checks", |
| 967 | collection: "view1", |
| 968 | disableIntegrityChecks: true, |
| 969 | expectError: false, |
| 970 | }, |
| 971 | { |
| 972 | name: "view without references", |
| 973 | collection: "view2", |
| 974 | disableIntegrityChecks: true, |
| 975 | expectError: false, |
| 976 | }, |
| 977 | } |
| 978 | |
| 979 | for _, s := range scenarios { |
| 980 | t.Run(s.name, func(t *testing.T) { |
| 981 | app, _ := tests.NewTestApp() |
| 982 | defer app.Cleanup() |
nothing calls this directly
no test coverage detected
searching dependent graphs…