This repository was archived by the owner on Oct 1, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
It is possible to run Magento tests using remote PHP interpreter from the kubernetes cluster.
4
4
5
- 1 . Configure remote PHP interpreter in PhpStorm with credentials ` root:123123q ` . Use the IP which you get by running ` minikube ip `
5
+ 1 . Configure remote PHP interpreter in PhpStorm with credentials ` root:123123q ` . Use the IP which you get by running ` minikube ip ` and port ` 30022 `
6
6
![ ] ( configure-remote-php.png )
7
7
1 . Select configured remote PHP interpreter
8
8
![ ] ( select-remote-php.png )
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ function testNoCustomConfigBasic()
58
58
assertMagentoEditionIsCE
59
59
assertCeSampleDataNotInstalled
60
60
assertRedisCacheIsEnabled
61
+ assertRemotePhpWorks
61
62
}
62
63
63
64
# # Call and Run all Tests
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/expect -f
2
+
3
+ set timeout -1
4
+
5
+ spawn ssh root@magento.default -p 30022 -o " StrictHostKeyChecking no" -- ' php' ' -i'
6
+
7
+ expect " root@magento.default's password: "
8
+
9
+ send " 123123q\r"
10
+
11
+ expect eof
Original file line number Diff line number Diff line change @@ -532,3 +532,13 @@ function assertDevBoxContext()
532
532
533
533
assertTrue " Context switching does not work. Actual context: '$( getDevBoxContext) '; Expected context: '${context} '" ' [[ $(getDevBoxContext) == ${context} ]]'
534
534
}
535
+
536
+ function assertRemotePhpWorks()
537
+ {
538
+ echo " ${blue} ## assertRemotePhpWorks${regular} "
539
+ echo " ## assertRemotePhpWorks" >> ${current_log_file_path}
540
+
541
+ remote_php_ini_contents=" $( expect " ${tests_dir} /_files/run_php_over_ssh_in_cluster.sh" ) "
542
+
543
+ assertTrue " Remote PHP is not accessible ('php -i' failed to execute over ssh)." ' [[ ${remote_php_ini_contents} =~ "PHP License" ]]'
544
+ }
You can’t perform that action at this time.
0 commit comments