- 🇦🇺Australia darvanen Sydney, Australia
Agree this is vaulable, just needs tests to make it part of the module.
- 🇦🇺Australia darvanen Sydney, Australia
This change is badly needed for the test suite to run green because gitlab CI uses IPv6 in the browser, however, it is currently failing at the Unit test:
There were 3 failures: 1) Drupal\Tests\restrict_by_ip\Unit\UnitTest::testIpFailValidation with data set #3 ('127.0.0.1/8', 'Invalid /8') Failed asserting that exception of type "Drupal\restrict_by_ip\Exception\InvalidIPException" is thrown. /builds/project/restrict_by_ip/vendor/bin/phpunit:122 2) Drupal\Tests\restrict_by_ip\Unit\UnitTest::testIpFailValidation with data set #4 ('127.0.0.1/16', 'Invalid /16') Failed asserting that exception of type "Drupal\restrict_by_ip\Exception\InvalidIPException" is thrown. /builds/project/restrict_by_ip/vendor/bin/phpunit:122 3) Drupal\Tests\restrict_by_ip\Unit\UnitTest::testIpFailValidation with data set #5 ('127.0.0.1/24', 'Invalid /24') Failed asserting that exception of type "Drupal\restrict_by_ip\Exception\InvalidIPException" is thrown. /builds/project/restrict_by_ip/vendor/bin/phpunit:122
- 🇦🇺Australia darvanen Sydney, Australia
Seems Symfony's IPUtils doesn't check for valid CIDR ranges so that had to be put back in for IPv4 addresses.
I will admit I asked Junie (AI) to add some IPv6 testing data to the Unit test but I have looked them over and they seem right to me.
All tests are passing both locally and in the CI.
I'll leave this a short while for review and if there are no comments I'll commit it.