Added unit test for protocols in From field.
[arvados.git] / services / datamanager / summary / pull_list_test.go
index 9628a32018936bcc157e44b429b351bdaf218f56..8f17d28bb55986295a0047b3314a1c2d3c650f0e 100644 (file)
@@ -100,6 +100,18 @@ func (s *MySuite) TestCreatePullServers(c *C) {
                PullServers{To: []string{"keep3:25110"},
                        From: []string{"keep1:25108", "keep0:25107"}})
 
+       c.Check(
+               CreatePullServers(cs,
+                       stringSet("keep0:25107", "keep1:25108"),
+                       stringSet("https://keep3:25110", "http://keep2:25109",
+                               "https://keep1:25108", "http://keep0:25107"),
+                       []string{"https://keep3:25110", "http://keep2:25109",
+                               "https://keep1:25108", "http://keep0:25107"},
+                       1),
+               DeepEquals,
+               PullServers{To: []string{"keep3:25110"},
+                       From: []string{"https://keep1:25108", "http://keep0:25107"}})
+
        c.Check(
                CreatePullServers(cs,
                        stringSet("keep0:25107", "keep1:25108"),