From 7533276a8b444ac3d49f74c8da0fb31d8caf2650 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Thu, 22 Jul 2021 17:24:26 -0300 Subject: [PATCH] 16665: Exposes bug through updated test. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- services/keepproxy/keepproxy_test.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/services/keepproxy/keepproxy_test.go b/services/keepproxy/keepproxy_test.go index c49fbe0bb3..f02971d61b 100644 --- a/services/keepproxy/keepproxy_test.go +++ b/services/keepproxy/keepproxy_test.go @@ -265,12 +265,16 @@ func (s *ServerRequiredSuite) TestDesiredReplicas(c *C) { content := []byte("TestDesiredReplicas") hash := fmt.Sprintf("%x", md5.Sum(content)) - for _, kc.Want_replicas = range []int{0, 1, 2} { + for _, kc.Want_replicas = range []int{0, 1, 2, 3} { locator, rep, err := kc.PutB(content) - c.Check(err, Equals, nil) - c.Check(rep, Equals, kc.Want_replicas) - if rep > 0 { - c.Check(locator, Matches, fmt.Sprintf(`^%s\+%d(\+.+)?$`, hash, len(content))) + if kc.Want_replicas < 3 { + c.Check(err, Equals, nil) + c.Check(rep, Equals, kc.Want_replicas) + if rep > 0 { + c.Check(locator, Matches, fmt.Sprintf(`^%s\+%d(\+.+)?$`, hash, len(content))) + } + } else { + c.Check(err, ErrorMatches, ".*503.*") } } } -- 2.30.2