Rspec Spec

Sean Cribbs sean at basho.com
Tue Dec 6 08:47:36 EST 2011


Yehuda,

Which Ruby, Riak, and Ripple versions are you using?

An explanation of the TestServer (and the more generic Riak::Node class):
Its goal is to provide an in-memory-only Riak server whose data can be
easily cleared at the end of each example. It accomplishes this by
generating a sandbox of your existing Riak install (configured by the
:source key) that points at a different directory (configured by the :root
key, defaults to ./tmp/riak_test_server in Rails). During the generation,
it sets the KV and Search backends to use custom "test" versions that are
in memory and include some functions to clear all partitions quickly. Once
all the generation is done, it will start up the sandboxed node and connect
to the Erlang console (similar to `riak attach`, but in pure Ruby). At the
end of each example, it runs those clearing functions on the test backends
via the attached console, wiping all data stored in Riak.

In order to debug this, you might try a few things in the generated sandbox:

tmp/riak_test_server/bin/riak start
tmp/riak_test_server/bin/riak ping
tmp/riak_test_server/bin/riak attach
(use Ctrl-D to detach)
tmp/riak_test_server/bin/riak stop

If all of those work, then we'll dig into why the Ruby code fails.


On Tue, Dec 6, 2011 at 5:00 AM, Yehuda Zargrov <Yehuda at conduit.com> wrote:

> Hi,****
>
> ** **
>
> I’m trying to run some (empty at first stage) tests..****
>
> ** **
>
> *This is my spec file:*
>
> ** **
>
> require 'spec_helper'****
>
> ** **
>
> *describe AnalyticsController do*
>
> *  describe "generate_keys" do*
>
> * *
>
> *    it "should generate one key" do*
>
> * *
>
> *    end*
>
> * *
>
> *    it "should add a {key, value} pair" do*
>
> * *
>
> *    end*
>
> *  end*
>
> * *
>
> *end*
>
> * *
>
> *and this is my configure block in the spec_helper:*
>
> ** **
>
> *  RSpec.configure do |config|*
>
> * *
>
> *    require 'database_cleaner'*
>
> * *
>
> *    config.before(:all) { Ripple::TestServer.setup }*
>
> * *
>
> *    config.after(:each){ Ripple::TestServer.clear }*
>
> * *
>
> *    config.mock_with :rspec*
>
> * *
>
> * *
>
> * *
>
> *  end*
>
> ** **
>
> *I get this error:*
>
> Failure/Error: Unable to find matching line from backtrace****
>
>      ArgumentError:****
>
>        Could not find or open pipes for Riak console in
> /home/yehuda/air/tmp/riak_test_server/pipe.****
>
> ** **
>
> Any Ideas?****
>
> And by the way, does RSpect uses local riak to run the tests? Or does it
> run an in-memory riak for that purpose?****
>
> ** **
>
> Thanks,****
>
> ** **
>
>   **
>
> [image: Description:
> C:\Users\Yehuda\AppData\Roaming\Microsoft\Signatures\logo.gif]****
>
> *Yehuda Zargrov**
> *Software Engineer****
>
> *Conduit Your Site* <http://www.conduit.com/>****
>
> *t:* 972.8.9461713 ext +314 |   *m:* +972503473119   |   *f:* +97286382140
> ****
>
>
> This message may contain confidential and/or privileged information. It is
> intended to be read only by the individual or entity to whom it is
> addressed or by their designee.
> If the reader of this message is not the intended recipient, you are on
> notice that any uses, copy, disclose or distribution of this message, in
> any form, is strictly prohibited.
> If you have received this message in error, please notify the sender by
> reply email or by telephone and delete or destroy any copy of this message.
> Thank you.
>
> ****
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>


-- 
Sean Cribbs <sean at basho.com>
Developer Advocate
Basho Technologies, Inc.
http://www.basho.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111206/6175c0bb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1930 bytes
Desc: not available
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111206/6175c0bb/attachment-0001.gif>


More information about the riak-users mailing list