-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
tests with errors #328
Comments
Hi @Nilsonfsilva, thank you! Let me know when the packaging is done so that I can link it to the documentation or the landing page! I can't reproduce this error on my machine + 2 VMs. May I ask you which version of Python has been used? That will help a lot! I wish you all the best in this New Year! |
Hi!
I ask for a little patience in advance. Because according to the packaging policy, debian cannot use any external repositories. To package pyfunceble it is necessary that all dependencies are already in the distribution's repositories.
tests/checker/test_base.py - dns.resolver.NoResolverConfiguration: no nameservers all these files have errors due to this absence |
Oh, you discovered a problem in the way I process tests ... I'm testing with:
If I run with pytest I can reproduce an error:
Let me try to fix those issue ASAP. Used version: Python 3.10.9 |
This patch fixes #328. Indeed, before this patch, as I'm not using pytest in this project, an undiscovered issue was sitting there since the begining of the project. This patch fixes the issue by trying to correct the import path. Contributors: * @Nilsonfsilva
@Nilsonfsilva can you test against the origin/issue-328 branch ? I know that you are trying to package the |
Hi, thanks in advance for your attention. It will be a great pleasure to bring your project to Debian. take it easy, try to fix the bugs, and when you're ready and want to release a new version, we appreciate it. Since the debian robot will fetch the latest tag. If you want to send me before, the .tar.gz. with corrections to check, feel free. Thank you and I'm at your disposal! a hug! |
I believe we have evolved. But there are still other mistakes. =========================== short test summary info ============================ In the second environment, I simulate as if pyfunceble were inside the debian repositories, being built. That is, isolated without connections to external repositories. Because, for security reasons, deboian does not allow any packages to be communicated with anything external. Such errors occur: =================== ERRORS =========================================================================================== ERROR tests/checker/test_base.py - dns.resolver.NoResolverConfiguration: no nameservers |
That's an interesting output. I never thought it was possible to have a server without any DNS nameservers. Let's me write the patch :-) |
One question for you: Are you planing to deploy both package or only I deploy and maintain 2 packages:
|
This patch touches #328. Indeed, in some rare case, no system-wide resolver/nameservers may not be configured; causing our tests to fail. This patch fixes the issue by testing and handling the case that no resolver is given. From now on, if no nameserver is configured, the default one will be set instead to: - 1.1.1.1 - 8.8.8.8 - 9.9.9.9 Contributors: * @Nilsonfsilva
@Nilsonfsilva can you please test https://github.com/funilrys/PyFunceble/archive/refs/heads/issue-328.zip ? Or is there a way I can see the automated tests? I appreciate your patience. |
Indeed, since @Nilsonfsilva discovered a fatal error as described in #328 and fixed by 3c3405f he should be ackowledged as one of the contributor of the project.
Reopening as other issues may come. |
@Nilsonfsilva Can you please test again when you get some time? |
Fixed: * Security / Dependency Management: cryptography Mitigation of CVE-2023-0286 & CVE-2023-23931 through version bump. * Fatal Error: When no nameservers are configured or provided by the hosting system. (#328) * Semantic: git.io (#341) URLs with git.io were replaced with other one. * New linting issues. Improved: * SPECIAL Rules: weebly.com We now take down subdomains that return the 406 status code. * SPECIAL Rules: wordpress.com (#321) We now recognize subjects that were took down by Wordpress. * SPECIAL Rules: internal Uniformiization of the method for better and quicker development. * Dependency Management: sqlalchemy We upgraded to SQLAlchemy v2.x+. * Converters: internal Convertion can now be performed directely without initialization of subjects through the convet method. Removed: * Python Support: <=3.7 We do not test or support any usage of PyFunceble with python<=3.7. New: * Python Support: ~=3.11 We now test (CI/CD) and support python~=3.11. * Testing: pytest (#328) pytest can now be used by packager to tests pyfunceble before deployment. * Database: PostgreSQL We now support PostgreSQL as database type. * Filesystem: IPs as first-class citizens in plain text outputs (#268) From now on, IPs will be stored into the `ips` subdirectory when the plain text format is active. * SPECIAL Rules: subject-switch (#185 | #185#issuecomment-1290866362) We now support the subject switch from any domains. For example: - m.example.com -> example.com Outcome: m.example.com as INACTIVE - m.example.com -> example.org Outcome: NO status switch. - m.example.com -> a.example.com -> example.com Outcome: m.example.com as INACTIVE. - m.example.com/hello/world -> example.com/hello/world Outcome: m.example.com/hello/world as INACTIVE. * SPECIAL Rules: changeip (#311) When one of the known changeip domains provides `abuse.change.com` in the SOA record, the subject will be flagged as INACTIVE. * SPECIAL Rules: imgur.com (#319) We now flag removed images. * SPECIAL Rules: eToxic (#334) When a blog from the eToxic infrastructure (known domains) doesn't exists anymore, we flag them as INACTIVE. Contributors: * @Nilsonfsilva * @smed79 * @spirilln * @T145
Indeed, before this patch, we were installing serveral tools that are only meant for developers. This patch fixes the issue by making them available through some environment variables. Therefore, from now on, the following console scripts will only be available when the PYFUNCEBLE_INSTALL_DEVTOOLS or PYFUNCEBLE_DEVTOOLS environment variables are found when installing: - production-pyfunceble The following console scripts will from now on only be available when then PYFUNCEBLE_INSTALL_HELPERS or PYFUNCEBLE_HELPTOOLS environment variables are found when installing: - public-suffic-pyfunceble - the tool to regenerate the public suffix index file. - iana-pyfunceble - the tool the regenerate the iana index file. That means that from now on, only the following console scripts will be available: - pyfunceble - the pyfunceble tool. - PyFunceble - the pyfunceble tool - for retro-compatiblity. - clean-pyfunceble - the tool to cleanup pyfunceble's directories. This patch touches #328. Contributors: * @Nilsonfsilva
Hi @funilrys The problem was that pyfunceble depends on sqlalchemy 2.0 and in Debian this version took more than a year to migrate to the official repositories. And it was for this reason that pyfunceble packaging was stopped. Now everything is back to normal, I'm back to packaging and it's already under review with Debian Developer. @mitya57 The big question is, as your project is not something simple, but rather a very well-structured project, we need to ensure that everything in it is in full working order. And testing helps us ensure that. The Debian Developer, analyzing his project, noticed that the tests use the network to perform imports. He asks: Would there be any possibility of importing the package without the need for a network? As you well know, for security reasons, both Debian and Ubuntu do not allow external connections in the build process. And as our official repositories (unstable/Testing) are always receiving daily updates, we need to ensure that the packages do not have problems when they are rebuilt. However, feel free to do what is best for your project! Thank you in advance for your attention and I feel very flattered to maintain your Debian/ubuntu project, if sponsored. I will be waiting for you! Strong hug. .... |
Closing this. Thank you again for the effort and cooperation - again - @Nilsonfsilva. |
Hey !
First congratulations on the project.
I would like to inform you that we are packaging your project to be part of our repositories.
In the construction of the package, some tests presented errors. it would be possible to help us to discover the reason.
Here are the errors:
FAIL: test_is_valid (checker.syntax.test_ip.TestIPSyntaxChecker.test_is_valid)
Tests the method which let us check if the given subject is valid
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ip.py", line 267, in test_is_valid
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 255.45.65.0/24
======================================================================
FAIL: test_is_valid_range_v4 (checker.syntax.test_ip.TestIPSyntaxChecker.test_is_valid_range_v4)
Tests the method which let us check if the given subject is valid range.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ip.py", line 142, in test_is_valid_range_v4
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 255.45.65.0/24
======================================================================
FAIL: test_is_valid_range_v6 (checker.syntax.test_ip.TestIPSyntaxChecker.test_is_valid_range_v6)
Tests the method which let us check if the given subject is valid range.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ip.py", line 157, in test_is_valid_range_v6
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 2001:db8::/128
======================================================================
FAIL: test_is_valid_v4 (checker.syntax.test_ip.TestIPSyntaxChecker.test_is_valid_v4)
Tests the method which let us check if the given subject is valid.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ip.py", line 80, in test_is_valid_v4
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 255.45.65.0/24
======================================================================
FAIL: test_is_valid_v6 (checker.syntax.test_ip.TestIPSyntaxChecker.test_is_valid_v6)
Tests the method which let us check if the given subject is valid.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ip.py", line 95, in test_is_valid_v6
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 2001:db8:1234::/48
======================================================================
FAIL: test_is_valid (checker.syntax.test_ipv4.TestIPv4SyntaxChecker.test_is_valid)
Tests the method which let us check if the given subject is valid.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ipv4.py", line 80, in test_is_valid
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 255.45.65.0/24
======================================================================
FAIL: test_is_valid_range (checker.syntax.test_ipv4.TestIPv4SyntaxChecker.test_is_valid_range)
Tests the method which let us check if the given subject is valid range.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ipv4.py", line 110, in test_is_valid_range
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 255.45.65.0/24
======================================================================
FAIL: test_is_valid (checker.syntax.test_ipv6.TestIPv6SyntaxChecker.test_is_valid)
Tests the method which let us check if the given subject is valid.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ipv6.py", line 80, in test_is_valid
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 2001:db8:1234::/48
======================================================================
FAIL: test_is_valid_range (checker.syntax.test_ipv6.TestIPv6SyntaxChecker.test_is_valid_range)
Tests the method which let us check if the given subject is valid range.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/checker/syntax/test_ipv6.py", line 111, in test_is_valid_range
self.assertEqual(expected, actual, subject)
AssertionError: True != False : 2001:db8::/128
======================================================================
FAIL: test_get_converted (converter.test_cidr2subject.TestCIDR2Subject.test_get_converted)
Tests the method which let us get the converted data.
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/pkg-pyfunceble/pyfunceble-4.1.3/tests/converter/test_cidr2subject.py", line 113, in test_get_converted
self.assertTrue(Counter(expected) == Counter(actual))
AssertionError: False is not true
The text was updated successfully, but these errors were encountered: