anchor.diff:                                    "clownco-org-admin", KeyPath)
        end,
        fun(_X) ->
  -             stopping
  +             test_utils:test_cleanup(ignore)
        end,
        fun(ReqConfig) ->
                [
  
positive.code: -include("../src/chef_req.hrl").
  -include_lib("eunit/include/eunit.hrl").
  
  create_node_as_user_test_() ->
      {setup,
       fun() ->
               ok = chef_req:start_apps(),
               KeyPath = "/tmp/opscode-platform-test/clownco-org-admin.pem",
               chef_req:make_config("http://localhost",
                                    "clownco-org-admin", KeyPath)
       end,
       fun(_X) ->
               stopping
       end,
       fun(ReqConfig) ->
               [
                {"empty node search as clownco-org-admin",
                  fun() ->
                          Path = "/organizations/clownco/nodes",
                          NodeJson = sample_node(),
                          {ok, Code, _H, Body} = chef_req:request(post, Path, NodeJson, ReqConfig),
                         ?debugVal(Code),
                         ?debugVal(_H),
                         ?debugVal(Body)
                  end}]
       end}.
  
  %% create_node_as_client_test_() ->
  %%     {setup,
  %%      fun() ->
  %%              ok = chef_req:start_apps(),
  %%              KeyPath = "/tmp/opscode-platform-test/clownco-org-admin.pem",
  %%              ReqConfig = chef_req:make_config("http://localhost",
  %%                                               "clownco-org-admin", KeyPath),
  %%              {_, ClientConfig} = make_client("clownco", "client01", ReqConfig),
  %%              ClientConfig
  %%      end,
  %%      fun(#req_config{name = Name}=ReqConfig) ->
  %%              delete_client("clownco", Name, ReqConfig)
  %%      end,
  %%      fun(ReqConfig) ->
  %%              [
  %%               {"create a node",
  %%                fun() ->
  %%                        NodeJson = sample_node(),
  %%                        Path = "/organizations/clownco/nodes",
  %%                        {ok, Code, _H, Body} = chef_req:request(post, Path, NodeJson, ReqConfig),
  %%                        ?debugVal(Code),
  %%                        ?debugVal(_H),
  %%                        ?debugVal(Body)
  %%                end}
  
  %%              ]
  %%      end}.
      
  search_as_client_test_() ->
      {setup,
       fun() ->
  
negative.code:                         Path = search_path("clownco", "node",
                                             "no_field:not_exist"),
                          {ok, "401", _H, Body} = chef_req:request(get, Path, Config),
                          ?assertEqual(<<"{\"error\":[\"Failed to authenticate as "
                                         "'no-such-user'. Ensure that your node_name "
                                         "and client key are correct.\"]}">>,
                                       Body)
                  end},
  
  