support tagging based policy conditions (#15763)

This commit is contained in:
Harshavardhana
2022-09-28 11:25:46 -07:00
committed by GitHub
parent 4f1ff9c4d9
commit 41b633f5ea
9 changed files with 189 additions and 117 deletions

View File

@@ -295,12 +295,14 @@ func TestReplicate(t *testing.T) {
{ObjectOpts{Name: "xa/c5test", UserTags: "k1=v1", Replica: false}, cfgs[4], true}, // 40. replica syncing disabled, this object is NOT a replica
}
for i, testCase := range testCases {
result := testCase.c.Replicate(testCase.opts)
if result != testCase.expectedResult {
t.Fatalf("case %v: expected: %v, got: %v", i+1, testCase.expectedResult, result)
}
for _, testCase := range testCases {
testCase := testCase
t.Run(testCase.opts.Name, func(t *testing.T) {
result := testCase.c.Replicate(testCase.opts)
if result != testCase.expectedResult {
t.Errorf("expected: %v, got: %v", testCase.expectedResult, result)
}
})
}
}