Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CocoaPods tests rely on being online #1477

Closed
orta opened this issue Oct 14, 2013 · 10 comments
Closed

CocoaPods tests rely on being online #1477

orta opened this issue Oct 14, 2013 · 10 comments
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s2:confirmed Issues that have been confirmed by a CocoaPods contributor t1:enhancement Enhancements that have not been picked up yet. Please comment if you plan to work on it

Comments

@orta
Copy link
Member

orta commented Oct 14, 2013

Reference tweet " Honestly, the main issue I’ve run into with contributing is the dev setup. Tests have odd dependencies, require net access "

@fabiopelosin
Copy link
Member

👍

@CocoaPodsBot
Copy link

Issue has been confirmed by @segiddins

@orta orta assigned CocoaPodsBot and unassigned CocoaPodsBot Mar 29, 2014
@orta
Copy link
Member Author

orta commented Jun 16, 2014

@segiddins know if this is still legit?

@kylef
Copy link
Contributor

kylef commented Sep 14, 2014

This issue is still valid, it's only a single test which requires internet use.

"validates a podspec with dependencies" from spec/unit/validator_spec.rb which it tries to validate the ZKit podspec which has a dependency to SBJson. This is causing it to try and download SBJson from the internet.

Pod::Informative: [!] /usr/local/bin/git clone https://github.com/stig/json-framework.git /private/tmp/CocoaPods/Lint/Pods/SBJson --single-branch --depth 1 --branch v3.2.0

Cloning into '/private/tmp/CocoaPods/Lint/Pods/SBJson'...

fatal: unable to access 'https://github.com/stig/json-framework.git/': Could not resolve host: github.com

    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/executable.rb:70:in `execute_command': Extensive analysis - validates a podspec with dependencies
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/downloader.rb:9:in `execute_command'
    /Users/kylef/gems/bundler/gems/cocoapods-downloader-13d36d08a421/lib/cocoapods-downloader/base.rb:152:in `block in executable'
    /Users/kylef/gems/bundler/gems/cocoapods-downloader-13d36d08a421/lib/cocoapods-downloader/git.rb:72:in `block in clone'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/downloader.rb:40:in `block in ui_sub_action'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/user_interface.rb:49:in `section'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/downloader.rb:39:in `ui_sub_action'
    /Users/kylef/gems/bundler/gems/cocoapods-downloader-13d36d08a421/lib/cocoapods-downloader/git.rb:59:in `clone'
    /Users/kylef/gems/bundler/gems/cocoapods-downloader-13d36d08a421/lib/cocoapods-downloader/git.rb:29:in `download!'
    /Users/kylef/gems/bundler/gems/cocoapods-downloader-13d36d08a421/lib/cocoapods-downloader/base.rb:80:in `block in download'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/downloader.rb:24:in `block in ui_action'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/user_interface.rb:49:in `section'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/downloader.rb:23:in `ui_action'
    /Users/kylef/gems/bundler/gems/cocoapods-downloader-13d36d08a421/lib/cocoapods-downloader/base.rb:78:in `download'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer/pod_source_installer.rb:98:in `download_source'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer/pod_source_installer.rb:45:in `install!'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer.rb:298:in `install_source_of_pod'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer.rb:273:in `block (2 levels) in install_pod_sources'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/user_interface.rb:70:in `titled_section'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer.rb:272:in `block in install_pod_sources'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer.rb:264:in `each'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer.rb:264:in `install_pod_sources'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer.rb:116:in `block in download_dependencies'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/user_interface.rb:49:in `section'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer.rb:114:in `download_dependencies'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/installer.rb:91:in `install!'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/validator.rb:301:in `install_pod'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/validator.rb:207:in `block in perform_extensive_analysis'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/validator.rb:203:in `each'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/validator.rb:203:in `perform_extensive_analysis'
    /Users/kylef/Projects/CocoaPods/CocoaPods/lib/cocoapods/validator.rb:69:in `validate'
    spec/unit/validator_spec.rb:325:in `block (3 levels) in <module:Pod>'
    /Users/kylef/Projects/CocoaPods/CocoaPods/spec/spec_helper/pre_flight.rb:30:in `call'
    /Users/kylef/Projects/CocoaPods/CocoaPods/spec/spec_helper/pre_flight.rb:30:in `block in <class:Context>'
    spec/unit/validator_spec.rb:315:in `block (2 levels) in <module:Pod>'
    spec/unit/validator_spec.rb:98:in `block in <module:Pod>'
    spec/unit/validator_spec.rb:17:in `<module:Pod>'
    spec/unit/validator_spec.rb:16:in `<top (required)>'

@kylef kylef added d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase t1:enhancement Enhancements that have not been picked up yet. Please comment if you plan to work on it labels Sep 14, 2014
@fabiopelosin
Copy link
Member

Yeah I did some work for it... however iirc correctly also some integration tests present an issue with a repo which was not easy to solve.

@segiddins
Copy link
Member

I think now it's only the integration specs. We could definitely fix that in a super hack way (by injecting a 'hack' ruby file to override sources so we can use submodules or a tarball), but I'm not sure if thats worth it. Thoughts, @mrackwitz ?

@mrackwitz
Copy link
Member

Would be nice to have, but it's for me still not top priority. Also I think it's good that we test the actual download code paths.

@segiddins
Copy link
Member

👍

@cbowns
Copy link

cbowns commented Sep 26, 2015

👎 I've worked on a slow connection on a couple projects which have tests like this, and it's maddening. Please reconsider this, especially if it's just one or two tests which require network access. Having an --offline flag, or making it easy to skip them, or something.

Not all developers have always-on, super-fast, unmetered wifi connections. Please consider ways to make the project easy and accessible for them.

@segiddins
Copy link
Member

It's only the integration specs that have a net dependency, and they're specifically testing things that use the network. The unit and functional specs should all work offline. We'd welcome a PR making the integration specs work offline, but it's just not worth the effort for us at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s2:confirmed Issues that have been confirmed by a CocoaPods contributor t1:enhancement Enhancements that have not been picked up yet. Please comment if you plan to work on it
Projects
None yet
Development

No branches or pull requests

7 participants