MCPcopy
hub / github.com/minio/minio-go / TestConfigEqual

Function TestConfigEqual

pkg/notification/notification_test.go:1243–1407  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1241}
1242
1243func TestConfigEqual(t *testing.T) {
1244 type args struct {
1245 config Config
1246 events []EventType
1247 prefix string
1248 suffix string
1249 }
1250 tests := []struct {
1251 name string
1252 args args
1253 expected bool
1254 }{
1255 {
1256 name: "Config equal true",
1257 args: args{
1258 events: []EventType{ObjectAccessedAll},
1259 prefix: "x",
1260 suffix: "",
1261 config: Config{
1262 ID: "",
1263 Events: []EventType{
1264 ObjectAccessedAll,
1265 },
1266 Filter: &Filter{
1267 S3Key: S3Key{
1268 FilterRules: []FilterRule{
1269 {
1270 Name: "prefix",
1271 Value: "x",
1272 },
1273 },
1274 },
1275 },
1276 },
1277 },
1278 expected: true,
1279 },
1280 {
1281 name: "Config Events different",
1282 args: args{
1283 events: []EventType{ObjectCreatedAll},
1284 prefix: "x",
1285 suffix: "",
1286 config: Config{
1287 ID: "",
1288 Events: []EventType{
1289 ObjectAccessedAll,
1290 },
1291 Filter: &Filter{
1292 S3Key: S3Key{
1293 FilterRules: []FilterRule{
1294 {
1295 Name: "prefix",
1296 Value: "x",
1297 },
1298 },
1299 },
1300 },

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.80

Tested by

no test coverage detected