You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2022/05/20 14:49:16 UTC

[GitHub] [libcloud] ogayot opened a new pull request, #1697: tests: add way to skip tests that require access to the network/Internet

ogayot opened a new pull request, #1697:
URL: https://github.com/apache/libcloud/pull/1697

   ## tests: add way to skip tests that require access to the network/Internet
   
   ### Description
   Hello,
   
   This patch introduces two new variables which allow to skip some of the tests run:
   
    * `NO_INTERNET` -> skips the tests that require access to the Internet
    * `NO_NETWORK` -> skips the tests that require the network to be up.
   
   `NO_NETWORK` implies `NO_INTERNET`.
   
   Tests that are skipped by `NO_NETWORK` include tests that bind sockets to the loopback interface.
   
   As for the two tests that are skipped with `NO_INTERNET`, they respectively:
   
    * send DNS queries and expect a NXDOMAIN response
    * attempt to send packets to 10.255.255.1 and expect a timeout (this requires a default route)
   
   #### Rationale
   
   In Ubuntu, we don't have full access to the Internet when running the test suite as part of autopkgtest, so we will set the `NO_INTERNET` variable to skip the tests that we cannot run.
   To simulate a lack of Internet access, I ran the tests in a new, clean, network namespace (i.e., `# ip netns add test ; ip netns exec test /bin/bash`). Unfortunately, more tests started to fail (including the ones that bind to the loopback interface).
   Therefore, I also added the `NO_NETWORK` variable, that disables more tests.
   
   Thanks,
   Olivier
   
   ### Status
   
   - done, ready for review
   
   ### Checklist (tick everything that applies)
   
   - [x] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks)
   - [ ] Documentation
   - [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
   - [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [libcloud] codecov-commenter commented on pull request #1697: tests: add way to skip tests that require access to the network/Internet

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1697:
URL: https://github.com/apache/libcloud/pull/1697#issuecomment-1133006267

   # [Codecov](https://codecov.io/gh/apache/libcloud/pull/1697?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1697](https://codecov.io/gh/apache/libcloud/pull/1697?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e07170f) into [trunk](https://codecov.io/gh/apache/libcloud/commit/f3aa980ee55ac914b340c5d129435357c30082c8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f3aa980) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/libcloud/pull/1697/graphs/tree.svg?width=650&height=150&src=pr&token=PYoduksh69&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/libcloud/pull/1697?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##            trunk    #1697   +/-   ##
   =======================================
     Coverage   83.28%   83.28%           
   =======================================
     Files         400      400           
     Lines       87655    87659    +4     
     Branches     9321     9321           
   =======================================
   + Hits        73002    73006    +4     
     Misses      11480    11480           
     Partials     3173     3173           
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/libcloud/pull/1697?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [libcloud/test/\_\_init\_\_.py](https://codecov.io/gh/apache/libcloud/pull/1697/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliY2xvdWQvdGVzdC9fX2luaXRfXy5weQ==) | `87.50% <100.00%> (+0.43%)` | :arrow_up: |
   | [libcloud/test/compute/test\_ovh.py](https://codecov.io/gh/apache/libcloud/pull/1697/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliY2xvdWQvdGVzdC9jb21wdXRlL3Rlc3Rfb3ZoLnB5) | `97.34% <100.00%> (ø)` | |
   | [libcloud/test/test\_connection.py](https://codecov.io/gh/apache/libcloud/pull/1697/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliY2xvdWQvdGVzdC90ZXN0X2Nvbm5lY3Rpb24ucHk=) | `97.44% <100.00%> (ø)` | |
   | [libcloud/test/test\_http.py](https://codecov.io/gh/apache/libcloud/pull/1697/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliY2xvdWQvdGVzdC90ZXN0X2h0dHAucHk=) | `91.30% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/libcloud/pull/1697?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/libcloud/pull/1697?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f3aa980...e07170f](https://codecov.io/gh/apache/libcloud/pull/1697?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [libcloud] Kami merged pull request #1697: tests: add way to skip tests that require access to the network/Internet

Posted by GitBox <gi...@apache.org>.
Kami merged PR #1697:
URL: https://github.com/apache/libcloud/pull/1697


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org