You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Kevin Jackson <fo...@gmail.com> on 2009/05/18 21:26:26 UTC

[Patch] remove redundant delete db call in basics.js test

Hi,

As issue 100 [1] has been fixed in the trunk code, the test doesn't
need to have an additional delete.  Please see attached patch.  (I've
included inline as the mailing list software may strip attachments).

Thanks,
Kev

Index: basics.js
===================================================================
--- basics.js   (revision 776052)
+++ basics.js   (working copy)
@@ -18,9 +18,6 @@
     var db = new CouchDB("test_suite_db");
     db.deleteDb();

-    // bug COUCHDB-100: DELETE on non-existent DB returns 500 instead of 404
-    db.deleteDb();
-
     db.createDb();

     // PUT on existing DB should return 412 instead of 500

Re: [Patch] remove redundant delete db call in basics.js test

Posted by Kevin Jackson <fo...@gmail.com>.
Hi,

> Just because we fixed the bug doesn't mean we should stop testing it.

Ok, that makes sense, but the current basics.js doesn't test that the
return value from db.deleteDb is the correct status, it simply calls
db.deleteDb twice - this doesn't assert anything

> Also, we should probably make an explicit test that the status is 412
> even if deleteDB has an internal check.

That makes more sense.

Kev

Re: [Patch] remove redundant delete db call in basics.js test

Posted by Paul Davis <pa...@gmail.com>.
Just because we fixed the bug doesn't mean we should stop testing it.
Also, we should probably make an explicit test that the status is 412
even if deleteDB has an internal check.

On Mon, May 18, 2009 at 3:26 PM, Kevin Jackson <fo...@gmail.com> wrote:
> Hi,
>
> As issue 100 [1] has been fixed in the trunk code, the test doesn't
> need to have an additional delete.  Please see attached patch.  (I've
> included inline as the mailing list software may strip attachments).
>
> Thanks,
> Kev
>
> Index: basics.js
> ===================================================================
> --- basics.js   (revision 776052)
> +++ basics.js   (working copy)
> @@ -18,9 +18,6 @@
>     var db = new CouchDB("test_suite_db");
>     db.deleteDb();
>
> -    // bug COUCHDB-100: DELETE on non-existent DB returns 500 instead of 404
> -    db.deleteDb();
> -
>     db.createDb();
>
>     // PUT on existing DB should return 412 instead of 500
>