Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot run tests with docker #7071

Closed
butonic opened this issue Aug 18, 2023 · 3 comments · Fixed by #7227
Closed

cannot run tests with docker #7071

butonic opened this issue Aug 18, 2023 · 3 comments · Fixed by #7227
Assignees

Comments

@butonic
Copy link
Member

butonic commented Aug 18, 2023

I had assumed that I do not need any php on my machine because the tests run in docker constainers ... But I get a problem with php and the ldap extension ...

make -C tests/acceptance/docker localApiTests-apiGraph-ocis
[...]
behat composer.lock is not up to date.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laminas/laminas-ldap 2.15.0 requires ext-ldap * -> it is missing from your system. Install or enable PHP's ldap extension.
    - laminas/laminas-ldap[2.16.0, ..., 2.17.0] require php ~8.0.0 || ~8.1.0 || ~8.2.0 -> your php version (7.4; overridden via config.platform, actual: 8.2.9) does not satisfy that requirement.
    - Root composer.json requires laminas/laminas-ldap ^2.15 -> satisfiable by laminas/laminas-ldap[2.15.0, 2.16.0, 2.17.0].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-ldap` to temporarily ignore these required extensions.
make[1]: *** [Makefile:263: ../../../vendor-bin/behat/composer.lock] Fehler 2
make: *** [Makefile:145: localApiTests-apiGraph-ocis] Fehler 2
make: Verzeichnis „/home/jfd/Repositories/ocis/tests/acceptance/docker“ wird verlassen
@amrita-shrestha
Copy link
Contributor

amrita-shrestha commented Aug 22, 2023

Can't reproduce locally in ubuntu22.04

  • checked in both PHP versions image: owncloudci/php:8.0 and image: owncloudci/php:7.4
  • missed mentioning that docker composer version should be v1 in the docs

@butonic could you provide more information like

  • Operating system
  • default PHP version in your system?

@butonic
Copy link
Member Author

butonic commented Aug 24, 2023

OS is arch based Elementary OS

✗ php -v
PHP 8.2.9 (cli) (built: Aug 13 2023 06:12:43) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.9, Copyright (c) Zend Technologies

I had assumed the docker based tests do NOT use my local PHP. That complicates things ...

@amrita-shrestha
Copy link
Contributor

amrita-shrestha commented Sep 5, 2023

Reproduced successfully
In Makefile composer update code uses our local system PHP version ( php-xml and php-ldap should be pre-install to avoid the above error)

../../../vendor-bin/behat/composer.lock: ../../../vendor-bin/behat/composer.json
	@echo behat composer.lock is not up to date.
	@composer update --no-progress -d ../../../vendor-bin/behat

../../../composer.lock: ../../../composer.json
	@echo composer.lock is not up to date.
	@composer update --no-progress -d ../../../

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants