All tests failing
lucabartoli-ow opened this issue · comments
Hi all,
i'm trying to run the tests, but I always get "You must provide a Hubspot api key or token."
Where is the correct place to put my key to run tests?
No specifications in CONTRIBUTING.md
$this->client = new Client([
'key' => 'yourKey',
]);
or put your key as env variable HUBSPOT_SECRET
Is there a way to run the tests without an API key? Currently the build is broken because of that and it is very difficult to contribute to a project without being able to run the tests.
Same thing here. I do agree with @joesantos418 about contributing to a project with failing tests :/
Agreed, this should be easier to find.
HUBSPOT_TEST_API_KEY is what it appears has to be set as an environment variable for testing.
% HUBSPOT_TEST_API_KEY=<Hubspot-api-key-to-use-for-testing>
% export HUBSPOT_TEST_API_KEY
% vendor/bin/phpunit tests/Integration/Resources/ContactsTest
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
.................... 20 / 20 (100%)
Time: 1.02 minutes, Memory: 6.00MB
HUBSPOT_SECRET should work for non-tests, but the way it is implemented in Tests\Integration\Abstraction\DefaultTestCase::getClient(), HUBSPOT_API_TEST_KEY must be used for when testing.
Hi everyone
I ve added .env.template where specified all necessary parameters for running tests
and docker container for running tests