فهرست منبع

started adding more pack tests and packing of temp ops

Brian Gough 10 سال پیش
والد
کامیت
612079ef8a
2فایلهای تغییر یافته به همراه17 افزوده شده و 1 حذف شده
  1. 3 1
      services/track-changes/pack.sh
  2. 14 0
      services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee

+ 3 - 1
services/track-changes/pack.sh

@@ -1,7 +1,9 @@
-#!/bin/bash
+#!/bin/bash -x
 
 
 # find all the docHistories with unpacked ops and pack them
 # find all the docHistories with unpacked ops and pack them
 
 
+# need to keep track of docs already done
+
 HOST=${1:-"localhost:3015"}
 HOST=${1:-"localhost:3015"}
 T=${2:-10}
 T=${2:-10}
 
 

+ 14 - 0
services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee

@@ -230,3 +230,17 @@ describe "PackManager", ->
 
 
 				it "should call the callback", ->
 				it "should call the callback", ->
 					@callback.called.should.equal true
 					@callback.called.should.equal true
+
+	describe "convertDocsToPacks", ->
+		describe "with several small packs", ->
+			beforeEach ->
+				@ops = [
+					{ op: "op-3", meta: "meta-3", v: 3},
+					{ op: "op-4", meta: "meta-4", v: 4}
+				]
+				@PackManager.convertDocsToPacks @ops, @callback
+#			it "should create a single pack", ->
+#				@callback.
+			it "should call the callback", ->
+				@callback.called.should.equal true
+