Giter Club home page Giter Club logo

Comments (9)

ppshobi avatar ppshobi commented on July 28, 2024 1

yes. And I believe the issue comes with the static methods and properties we have on the test classes. When I run with Xdebug, I can see the api_key being passed to the client. And generally, I tend to avoid static methods overall. Let me try to isolate the issue in these tests.

from meilisearch-php.

ppshobi avatar ppshobi commented on July 28, 2024 1

It was really my issue, where I was running the docker container with wrong master-key 👎

from meilisearch-php.

curquiza avatar curquiza commented on July 28, 2024

Hello!
Thanks for your feedback! Glad to read you want to contribute 😁

Weird, I use php 7.4 too:

$> php -v
PHP 7.4.5 (cli) (built: Apr 18 2020 03:17:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies

What do you run exactly as commands?

I ran exactly the same commands than in the README:

$ docker run -d -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics=true
$ vendor/bin/phpunit --color tests/

from meilisearch-php.

ppshobi avatar ppshobi commented on July 28, 2024

This is what I run on the terminal.

PHPUnit 8.5.3 by Sebastian Bergmann and contributors.

.........................................FFF..................... 65 / 75 ( 86%)
..........                                                        75 / 75 (100%)

Time: 1.31 seconds, Memory: 8.00 MB

There were 3 failures:

1) KeysAndPermissionsTest::testExceptionIfNoMasterKeyProvided
Failed asserting that exception of type "MeiliSearch\Exceptions\HTTPRequestException" is thrown.

2) KeysAndPermissionsTest::testExceptionIfBadKeyProvidedToGetSettings
Failed asserting that exception of type "MeiliSearch\Exceptions\HTTPRequestException" is thrown.

3) KeysAndPermissionsTest::testExceptionIfBadKeyProvidedToGetKeys
Failed asserting that exception of type "MeiliSearch\Exceptions\HTTPRequestException" is thrown.

FAILURES!
Tests: 75, Assertions: 260, Failures: 3.

from meilisearch-php.

ppshobi avatar ppshobi commented on July 28, 2024

Just made a PR with some changes, and the CI went fine.

from meilisearch-php.

curquiza avatar curquiza commented on July 28, 2024

Ok! Don't know why then... 😅
Thanks a lot!

from meilisearch-php.

curquiza avatar curquiza commented on July 28, 2024

Closed with #13

from meilisearch-php.

ppshobi avatar ppshobi commented on July 28, 2024

Actually I have this issue is still with me. The tests are not failing on CI when I was making the PR, but it fails for me in the local.

Actually here

return json_decode($res->getBody(), true);

The request gets succeeded even if the key is not passed at all. I have downloaded the latest docker image of meilisearch and ran it.

I have PHP 7.3.13 in another system and still, 3 tests I have mentioned is failing for me.

from meilisearch-php.

curquiza avatar curquiza commented on July 28, 2024

Ok, sorry I didn't get you still have this issue!

Complicated to investigate it, because I do not succeed to reproduce your issue.

Are you sure you run MeiliSearch with the --master-key=masterKey locally?

from meilisearch-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.