Skip to content

Comments

Add tests on the debug bar/profiler view#2314

Merged
alanpoulain merged 2 commits intoapi-platform:2.4from
antograssiot:test-profiler
Feb 12, 2019
Merged

Add tests on the debug bar/profiler view#2314
alanpoulain merged 2 commits intoapi-platform:2.4from
antograssiot:test-profiler

Conversation

@antograssiot
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

The idea is to prevent me or someone else to break the debug bar again 😅
I would totally understand if this is not merged though
ref #2307

@antograssiot
Copy link
Contributor Author

antograssiot commented Nov 6, 2018

@dunglas I'll need help to understand why appveyor run trigger deprecation warning. I suspected that LEGACY env var is set and tried to skip tests based on this but doesn't seems to work.
I could add @group legacy on all those tests but that does seems hacky

EDIT: most of those composer.json might have to target 2.3 🤔 ?

@antograssiot
Copy link
Contributor Author

I got appveyor build to pass, just waiting for chocaltey to be up...

@antograssiot antograssiot force-pushed the test-profiler branch 2 times, most recently from 3041b1d to 023f4b1 Compare November 15, 2018 17:37
@antograssiot
Copy link
Contributor Author

rebase and merge conflict resolved. May we merge ?

appveyor.yml Outdated

test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- php tests\Fixtures\app\console cache:clear
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it necessary? The cache should not be populated by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish I know the real reason... Both suites works without issue independently but when they are run without clearing the cache, in the second suite NelmioApiDocBundle was enabled for now real reason and trigger deprecation notices. (Enabling the NelmioApiDocBundle integration has been deprecated in 2.2 and will be removed in 3.0. NelmioApiDocBundle 3 has native support for API Platform.)
I've been fighting with this for a while on appveyor and finally looked at travis config

core/.travis.yml

Lines 45 to 53 in 7dbd207

script:
- tests/Fixtures/app/console cache:clear
- vendor/bin/phpunit
- tests/Fixtures/app/console cache:clear
- if [[ $APP_ENV = 'postgres' ]]; then
vendor/bin/behat --suite=postgres --format=progress;
else
vendor/bin/behat --suite=default --format=progress;
fi

It might be related to the way that I'm booting the kernel for the test...
😞

appveyor.yml Outdated
- cd %APPVEYOR_BUILD_FOLDER%
- php tests\Fixtures\app\console cache:clear
- php vendor\behat\behat\bin\behat --format=progress --suite=default
- php tests\Fixtures\app\console cache:clear
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird to have to do this

@antograssiot antograssiot force-pushed the test-profiler branch 2 times, most recently from 6f4f1ea to c37e2b4 Compare November 26, 2018 19:28
@antograssiot antograssiot force-pushed the test-profiler branch 3 times, most recently from 7114526 to 75e0fbb Compare December 24, 2018 17:07
@antograssiot antograssiot changed the base branch from master to 2.4 February 12, 2019 05:26
@antograssiot antograssiot force-pushed the test-profiler branch 2 times, most recently from 35007f3 to 297319e Compare February 12, 2019 05:43
update tests to support lowest dependencies

Avoid deprecation errors when booting kernel with NelmioApiDocBundle (try to fix appveyor)
@alanpoulain alanpoulain merged commit 9d54687 into api-platform:2.4 Feb 12, 2019
@alanpoulain
Copy link
Member

Thank you @antograssiot!

@antograssiot antograssiot deleted the test-profiler branch February 12, 2019 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants