Coder Social home page Coder Social logo

Sugar Unit Test about sugardockerized HOT 5 CLOSED

esimonetti avatar esimonetti commented on May 29, 2024
Sugar Unit Test

from sugardockerized.

Comments (5)

ShadMickelberry avatar ShadMickelberry commented on May 29, 2024 1

Awesome. Thanks a lot Enrico. I can run the composer install now. I appreciate your help.

from sugardockerized.

esimonetti avatar esimonetti commented on May 29, 2024

Hey Shad, honestly I have not tried. Have you tried from the utilities bash script to run a cli? That will run a command on the cron container that has access to all the elements of the stack.

Please do let me know if that works!

from sugardockerized.

ShadMickelberry avatar ShadMickelberry commented on May 29, 2024

Thanks a lot Enrico. I'll try that. I tried via ssh directly into the sugar-web1 container. I may try a bit more on that. Could be due to composer not being installed there.

I'll let you know

from sugardockerized.

ShadMickelberry avatar ShadMickelberry commented on May 29, 2024

Hey @esimonetti,

Here is what I've tried.
$ ./utilities/runcli.sh "cd tests/{old} && ../../vendor/bin/phpunit"
bash: ../../vendor/bin/phpunit: Permission denied
$ ./utilities/runcli.sh "cd tests/{old} && chmod +x ../../vendor/bin/phpunit && ../../vendor/bin/phpunit"
You need to setup the project dependencies
$ ./utilities/runcli.sh "composer install"
Your requirements could not be resolved to an installable set of packages.

Problem 1
- symfony/ldap v3.4.11 requires ext-ldap * -> the requested PHP extension ldap is missing from your system.
- symfony/ldap v3.4.11 requires ext-ldap * -> the requested PHP extension ldap is missing from your system.
- Installation request for symfony/ldap v3.4.11 -> satisfiable by symfony/ldap[v3.4.11].

To enable extensions, verify that they are enabled in your .ini files:
-
- /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini
- /usr/local/etc/php/conf.d/docker-php-ext-gd.ini
- /usr/local/etc/php/conf.d/docker-php-ext-gmp.ini
- /usr/local/etc/php/conf.d/docker-php-ext-imap.ini
- /usr/local/etc/php/conf.d/docker-php-ext-mcrypt.ini
- /usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini
- /usr/local/etc/php/conf.d/docker-php-ext-redis.ini
- /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
- /usr/local/etc/php/conf.d/docker.ini
- /usr/local/etc/php/conf.d/opcache.ini
- /usr/local/etc/php/conf.d/tideways.ini
- /usr/local/etc/php/conf.d/xhprof.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

I already did composer install from the host and installed the dependencies but they don't seem to be taking. I also tried updating all permissions but it didn't seem to do the trick.

I also looked into adding the ldap extension but that is a bit over my head in Docker right now.

Running from the host BTW I run into database connection errors. No big deal if this is a pain to implement or if you aren't going to have time to investigate.

from sugardockerized.

esimonetti avatar esimonetti commented on May 29, 2024

I had a look at it and I could get the phpunit to work without too much fuss. I am encountering some problems in terms of the js side of things though so I won't do that at this stage.
Checkout the latest version and give it a go now.

After copying the test in the right location, the following commands should do the trick:

./utilities/runcli.sh composer install
./utilities/runcli.sh chmod +x vendor/bin/phpunit
./utilities/runcli.sh "cd tests/unit-php && ../../vendor/bin/phpunit"
./utilities/runcli.sh "cd tests/{old} && ../../vendor/bin/phpunit"

Cheers

from sugardockerized.

Related Issues (18)

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.