Github user jaydoane commented on a diff in the pull request:
https://github.com/apache/couchdb-couch/pull/128#discussion_r45514103
--- Diff: test/couchdb_mrview_cors_tests.erl ---
@@ -86,14 +95,25 @@ create_db(backdoor, DbName) ->
{ok, Db} = couch_db:create(DbName, [?ADMIN_CTX]),
couch_db:close(Db);
create_db(clustered, DbName) ->
- ok = fabric:create_db(DbName, [?ADMIN_CTX]).
+ {ok, Status, _, _} = test_request:put(db_url(DbName), [?AUTH], ""),
+ true = lists:member(Status, [201, 202]),
+ ok.
delete_db(backdoor, DbName) ->
couch_server:delete(DbName, [?ADMIN_CTX]);
delete_db(clustered, DbName) ->
- ok = fabric:delete_db(DbName, [?ADMIN_CTX]).
+ {ok, 200, _, _} = test_request:delete(db_url(DbName), [?AUTH]),
+ ok.
+host_url(PortType) ->
+ Addr = config:get("httpd", "bind_address", "127.0.0.1"),
--- End diff --
Actually, I think the only way the host_url depends on PortType (which can
be either 'clustered' or 'backdoor') is expressed via the port/1 function. I'm
not sure how you would improve or generalize this.
Or did you mean db_url, which is only valid for clustered PortType? That
could be generalized by adding a PortType parameter, but I didn't bother since
it's only being used in the clustered cases.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---