2017-10-23 7 views
0

Drupal 7.56 일반 설치로 도커 컨테이너 (php : 7.1-apache 이미지로 빌드)가 있습니다.드루팔 (Drupal 7 simpletest)이 도커에서 작동하지 않습니다.

$this->account = $this->drupalCreateUser(); 
$this->drupalLogin($this->account); 

을하지만 다음 명령을 실행할 때 :

내 simpletest이 시작

docker exec simpletest bash -c "php scripts/run-tests.sh --url http://simpletest \ 
--verbose --color --class MyOwnWebTest" 

을 나는 조금 아래로 메시지를 다음 얻을 :

Fail  User login my_module 34 
MyOwnWebTest->testWeb 
User esxlZnK0 successfully logged in. 

그것은 아무튼 어떤 의미로 만들지는 않습니다 - 사용자가 생성되고 로그인되었지만 코드가 실패합니다!

답변

0

오케이 - 내 자신을 위해 알아 냈습니다.

$base_url = 'http://simpletest:83'; 

내가 테스트를 호출 오전 :

컨테이너는 설정이 그래서 아파치의 port.conf는 81 듣고 Drupals settings.php는 다음과 같은 설정이 있어야합니다 있어야합니다 포트 83 을 듣고있다 이 코드 줄 :

docker exec simpletest bash -c "php scripts/run-tests.sh \ 
--url http://simpletest:83 --verbose --color --class MyOwnWebTest"