(t *testing.T)
| 127 | } |
| 128 | } |
| 129 | func TestCheckRandomSQLs(t *testing.T) { |
| 130 | randomSqlsFirst := []map[string]map[string][]string{ |
| 131 | { |
| 132 | "slice0": {"db0": {"sql1", "sql2"}, "db1": {"sql1"}}, |
| 133 | "slice1": {"db2": {"sql1", "sql2"}, "db3": {"sql1"}}, |
| 134 | }, |
| 135 | } |
| 136 | randomSqlsSecond := []map[string]map[string][]string{ |
| 137 | { |
| 138 | "slice0": {"db0": {"sql1", "sql2"}}, |
| 139 | }, |
| 140 | { |
| 141 | "slice0": {"db1": {"sql1"}}, |
| 142 | }, |
| 143 | { |
| 144 | "slice1": {"db2": {"sql1", "sql2"}}, |
| 145 | }, |
| 146 | { |
| 147 | "slice1": {"db3": {"sql1"}}, |
| 148 | }, |
| 149 | } |
| 150 | tests := []struct { |
| 151 | name string |
| 152 | actual map[string]map[string][]string |
| 153 | expected bool |
| 154 | }{ |
| 155 | { |
| 156 | name: "Normal match", |
| 157 | actual: map[string]map[string][]string{ |
| 158 | "slice0": {"db0": {"sql1", "sql2"}}, |
| 159 | }, |
| 160 | expected: true, |
| 161 | }, |
| 162 | { |
| 163 | name: "Normal match", |
| 164 | actual: map[string]map[string][]string{ |
| 165 | "slice0": {"db0": {"sql2", "sql1"}}, |
| 166 | }, |
| 167 | expected: true, |
| 168 | }, |
| 169 | { |
| 170 | name: "Normal match", |
| 171 | actual: map[string]map[string][]string{ |
| 172 | "slice0": {"db1": {"sql1"}}, |
| 173 | }, |
| 174 | expected: true, |
| 175 | }, |
| 176 | { |
| 177 | name: "Normal match", |
| 178 | actual: map[string]map[string][]string{ |
| 179 | "slice1": {"db3": {"sql1"}}, |
| 180 | }, |
| 181 | expected: true, |
| 182 | }, |
| 183 | { |
| 184 | name: "Normal match", |
| 185 | actual: map[string]map[string][]string{ |
| 186 | "slice1": {"db2": {"sql2", "sql1"}}, |
nothing calls this directly
no test coverage detected