133
133
branch.commit("changed file")
134
134
target = Branch.initialize("target/")
135
135
source = Branch.open(self.get_remote_url("source/"))
136
source.weave_store.enable_cache = False
136
137
self.assertEqual(greedy_fetch(target, source), (2, []))
137
# this is the path to the literal file. As format changes
138
# occur it needs to be updated. FIXME: ask the store for the
140
weave_suffix = 'weaves/ce/id.weave HTTP/1.1" 200 -'
138
weave_suffix = 'weaves/id.weave HTTP/1.1" 200 -'
141
139
self.assertEqual(1,
142
140
len([log for log in self.weblogs if log.endswith(weave_suffix)]))
143
inventory_weave_suffix = 'inventory.weave HTTP/1.1" 200 -'
145
len([log for log in self.weblogs if log.endswith(
146
inventory_weave_suffix)]))
147
# this r-h check test will prevent regressions, but it currently already
148
# passes, before the patch to cache-rh is applied :[
149
revision_history_suffix = 'revision-history HTTP/1.1" 200 -'
151
len([log for log in self.weblogs if log.endswith(
152
revision_history_suffix)]))
154
# check there is nothing more to fetch
155
source = Branch.open(self.get_remote_url("source/"))
156
self.assertEqual(greedy_fetch(target, source), (0, []))
157
self.failUnless(self.weblogs[0].endswith('branch-format HTTP/1.1" 200 -'))
158
self.failUnless(self.weblogs[1].endswith('revision-history HTTP/1.1" 200 -'))
159
self.assertEqual(2, len(self.weblogs))