From 612079ef8a28f75a1a753ac1acb0aa746ae50523 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 28 Jan 2016 16:56:32 +0000 Subject: [PATCH] started adding more pack tests and packing of temp ops --- services/track-changes/pack.sh | 4 +++- .../coffee/PackManager/PackManagerTests.coffee | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/services/track-changes/pack.sh b/services/track-changes/pack.sh index 9a927af0ca..c2aad785c7 100755 --- a/services/track-changes/pack.sh +++ b/services/track-changes/pack.sh @@ -1,7 +1,9 @@ -#!/bin/bash +#!/bin/bash -x # find all the docHistories with unpacked ops and pack them +# need to keep track of docs already done + HOST=${1:-"localhost:3015"} T=${2:-10} diff --git a/services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee b/services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee index c538096a0a..e92bd09313 100644 --- a/services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee +++ b/services/track-changes/test/unit/coffee/PackManager/PackManagerTests.coffee @@ -230,3 +230,17 @@ describe "PackManager", -> it "should call the callback", -> @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 +