Download & Extend

Do not rely on active internet connection and 3rd party server at the tests

Project:FeedAPI
Version:6.x-1.x-dev
Component:Code (general)
Category:task
Priority:critical
Assigned:Aron Novak
Status:closed (fixed)

Issue Summary

All of the test cases depend on a 3rd party server and internet connection.
All of the test XML files should be hosted locally, inside the module tests directory.

Comments

#1

Status:active» needs review

Obvious.

AttachmentSize
560882_eliminate_3rd_party_dependency_at_tests.patch 37.46 KB

#2

Status:needs review» needs work

url() will break the tests if clean urls is not enabled. Use global $base_url instead.

#3

Status:needs work» needs review

#2: why do you think so? http://api.drupal.org/api/function/url/6 - it seems that this function is aware of clean url setting.

#4

Because when you build a url for a file, you don't want a query string in your url. The code as it stands right now, would create URLs that look like:

http://localhost?q=tests/files/test_feed.rss

which would break, because tests/files/test_feed.rss is not served from Drupal but from a file and therefore always needs to be

http://localhost/tests/files/test_feed.rss

#5

#4: thanks for the explanation!

Here i added a wrapper to generate test file URLs and using base_url of course.

The previous patch seems to be bogus also, cause a dynamic .php feed remained in the test suite. Now it's all good, can be executed without net connection

AttachmentSize
560882-5_eliminate_3rd_party_dependency_at_tests.patch 46.91 KB

#6

Status:needs review» fixed

Committed.
All of the tests can be executed w/o net connection (although a bit slower)

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here