Comments (9)
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.
It was really my issue, where I was running the docker container with wrong master-key 👎
from meilisearch-php.
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.
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.
Just made a PR with some changes, and the CI went fine.
from meilisearch-php.
Ok! Don't know why then... 😅
Thanks a lot!
from meilisearch-php.
Closed with #13
from meilisearch-php.
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
meilisearch-php/src/HTTPRequest.php
Line 94 in 972760c
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.
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)
- Ensure the error handling are following the best practice
- Add CodeCov
- [v1.4] [Prototype] User dictionary settings API HOT 1
- [v1.4] [Prototype] Separators settings api HOT 1
- Best type hint for setting return HOT 5
- The provided API key is invalid HOT 2
- Issue when upgrading from < 1.3 to >= 1.3 with api keys set to empty string HOT 3
- Cannot update ranking rules on index HOT 6
- http client recommendation: Symfony? HOT 10
- Split CI tests with different http clients into separate jobs
- Can't update faceting on the index. HOT 5
- We need a way to delete dumps HOT 1
- [v1.8] New `searchCutoffMs` index settings HOT 3
- [v1.8] Hybrid search improvements HOT 3
- Documentation CI does not work
- [v1.9.0] Filter by ranking score HOT 1
- [v1.9.0] Get similar documents HOT 1
- [v1.9] Distinct field at search time HOT 1
- [v1.9] Hybrid search changes HOT 1
- php-http/httplug and php-http/client-common are not required deps anymore? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meilisearch-php.