api de gestion de ticket, basé sur php-crud-api. Le but est de décorrélé les outils de gestion des données, afin
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

run.sh 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. # run mysql server
  3. nohup mysqld > /root/mysql.log 2>&1 &
  4. # wait for mysql to become available
  5. while ! mysqladmin ping -hlocalhost >/dev/null 2>&1; do
  6. sleep 1
  7. done
  8. # create database and user on mysql
  9. mysql -u root >/dev/null << 'EOF'
  10. CREATE DATABASE `php-crud-api` CHARACTER SET utf8 COLLATE utf8_general_ci;
  11. CREATE USER 'php-crud-api'@'localhost' IDENTIFIED BY 'php-crud-api';
  12. GRANT ALL PRIVILEGES ON `php-crud-api`.* TO 'php-crud-api'@'localhost' WITH GRANT OPTION;
  13. FLUSH PRIVILEGES;
  14. EOF
  15. # run postgres server
  16. nohup su - -c "/usr/lib/postgresql/9.1/bin/postgres -D /etc/postgresql/9.1/main" postgres > /root/postgres.log 2>&1 &
  17. # wait for postgres to become available
  18. until su - -c "psql -U postgres -c '\q'" postgres >/dev/null 2>&1; do
  19. sleep 1;
  20. done
  21. # create database and user on postgres
  22. su - -c "psql -U postgres >/dev/null" postgres << 'EOF'
  23. CREATE USER "php-crud-api" WITH PASSWORD 'php-crud-api';
  24. CREATE DATABASE "php-crud-api";
  25. GRANT ALL PRIVILEGES ON DATABASE "php-crud-api" to "php-crud-api";
  26. \q
  27. EOF
  28. # run the tests
  29. cd /root/php-crud-api
  30. git pull
  31. php phpunit.phar