Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit d2f4a4d

Browse files
committed
- Enabling additional test assertions for "No custom config" scenario
- Disabled scripts related to Windows host installations - Enabled config output for improved debugging experience
1 parent d3d29d6 commit d2f4a4d

File tree

9 files changed

+105
-81
lines changed

9 files changed

+105
-81
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ before_script:
2424
- sed -i "s|git@github.com:|https://github.com/|g" ./etc/config.yaml.dist
2525
- sed -i "s|minikube start --cpus=2 --memory=4096|sudo minikube start --cpus=2 --memory=4096 --vm-driver=none --bootstrapper=kubeadm --kubernetes-version=v1.13.0|g" ./init_project.sh
2626
- sed -i "s|&& eval \$(minikube docker-env) ||g" ./scripts/host/k_rebuild_environment.sh
27-
- sed -i "s/set global.persistence.nfs.serverIp=\"192.168.99.1\"/set global.persistence.nfs.serverIp=\"$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')\"/g" ./scripts/host/k_rebuild_environment.sh
27+
- sed -i "s/use_nfs:\ 1/use_nfs:\ 0/g" ./etc/config.yaml.dist
28+
- sed -i "s/nfs_server_ip:\ \"0\.0\.0\.0\"/nfs_server_ip:\ \"$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')\"/g" ./etc/config.yaml.dist
2829
- sed -i "s/enabled:\ true \# NFS Status/enabled:\ false \# NFS Status/g" ./etc/helm/values.yaml
30+
- cat ./tests/include/configuration.sh
31+
- cat ./scripts/host/k_rebuild_environment.sh
32+
- cat ./init_project.sh
33+
- cat ./etc/config.yaml.dist
2934

3035
script:
3136
# Run DevBox tests

etc/config.yaml.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ repository_url:
2626
guest:
2727
# [To apply changes: init_project.sh -f] NFS will be used for folder synchronization on *nix and OSX hosts by default.
2828
use_nfs: 1
29+
# [To apply changes: init_project.sh -f] The placeholder IP will be replaced with auto-detected value, unless modified manually before execution of "init_project.sh" script.
30+
nfs_server_ip: "0.0.0.0"
2931
# [To apply changes: vagrant reload] Default is 2Gb, around 3Gb is necessary to run functional tests.
3032
memory: 2048
3133
# Recommended number of CPUs is 2

init_project.sh

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ magento_ee_dir="${magento_ce_dir}/magento2ee"
2727
magento_ee_sample_data_dir="${magento_ce_dir}/magento2ee-sample-data"
2828
host_os="$(bash "${vagrant_dir}/scripts/host/get_host_os.sh")"
2929
use_nfs="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs")"
30+
nfs_server_ip="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_nfs_server_ip")"
3031
repository_url_ce="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "repository_url_ce")"
3132
#repository_url_checkout="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "repository_url_checkout")"
3233
repository_url_ee="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "repository_url_ee")"
@@ -37,12 +38,12 @@ checkout_source_from="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "check
3738
function checkoutSourceCodeFromGit()
3839
{
3940
if [[ ! -d ${magento_ce_dir} ]]; then
40-
if [[ ${host_os} == "Windows" ]]; then
41-
status "Configuring git for Windows host"
42-
git config --global core.autocrlf false
43-
git config --global core.eol LF
44-
git config --global diff.renamelimit 5000
45-
fi
41+
# if [[ ${host_os} == "Windows" ]]; then
42+
# status "Configuring git for Windows host"
43+
# git config --global core.autocrlf false
44+
# git config --global core.eol LF
45+
# git config --global diff.renamelimit 5000
46+
# fi
4647

4748
initMagentoCeGit
4849
initMagentoCeSampleGit
@@ -241,6 +242,18 @@ if [[ $(isMinikubeRunning) -eq 0 ]]; then
241242
# filterVagrantOutput "${lastline}"
242243
# }
243244
fi
245+
246+
config_content="$(cat ${config_path})"
247+
default_nfs_server_ip_pattern="nfs_server_ip: \"0\.0\.0\.0\""
248+
if [[ ! ${config_content} =~ ${default_nfs_server_ip_pattern} ]]; then
249+
status "Custom NFS server IP is already specified in etc/config.yaml (${nfs_server_ip})"
250+
else
251+
nfs_server_ip="$(minikube ip | grep -oh ^[0-9]*\.[0-9]*\.[0-9]*\. | head -1 | awk '{print $1"1"}')"
252+
status "Saving NFS server IP to etc/config.yaml (${nfs_server_ip})"
253+
sed -i.back "s|${default_nfs_server_ip_pattern}|nfs_server_ip: \"${nfs_server_ip}\"|g" "${config_path}"
254+
rm -f "${config_path}.back"
255+
fi
256+
244257
status "Configuring kubernetes cluster on the minikube"
245258
# TODO: Optimize. Helm tiller must be initialized and started before environment configuration can begin
246259
helm init --wait
@@ -261,10 +274,10 @@ else
261274
fi
262275
fi
263276

264-
minikube_ip="$(minikube service magento2-monolith --url | grep -oE '[0-9][^:]+' | head -1)"
265-
status "Saving minikube IP to etc/config.yaml (${minikube_ip})"
266-
sed -i.back "s|ip_address: \".*\"|ip_address: \"${minikube_ip}\"|g" "${config_path}"
267-
sed -i.back "s|host_name: \".*\"|host_name: \"${minikube_ip}\"|g" "${config_path}"
277+
monolith_ip="$(minikube service magento2-monolith --url | grep -oE '[0-9][^:]+' | head -1)"
278+
status "Saving Magento monolith container IP to etc/config.yaml (${monolith_ip})"
279+
sed -i.back "s|ip_address: \".*\"|ip_address: \"${monolith_ip}\"|g" "${config_path}"
280+
sed -i.back "s|host_name: \".*\"|host_name: \"${monolith_ip}\"|g" "${config_path}"
268281
rm -f "${config_path}.back"
269282

270283
bash "${vagrant_dir}/scripts/host/check_mounted_directories.sh"
@@ -278,28 +291,28 @@ if [[ ! -f "${vagrant_dir}/.idea/deployment.xml" ]]; then
278291
fi
279292
bash "${vagrant_dir}/scripts/host/configure_tests.sh"
280293

281-
if [[ ${host_os} == "Windows" ]] || [[ ${use_nfs} == 0 ]]; then
282-
# Automatic switch to EE during project initialization cannot be supported on Windows
283-
status "Installing Magento CE"
284-
bash "${vagrant_dir}/scripts/host/m_reinstall.sh" 2> >(logError)
285-
else
294+
#if [[ ${host_os} == "Windows" ]] || [[ ${use_nfs} == 0 ]]; then
295+
# # Automatic switch to EE during project initialization cannot be supported on Windows
296+
# status "Installing Magento CE"
297+
# bash "${vagrant_dir}/scripts/host/m_reinstall.sh" 2> >(logError)
298+
#else
286299
if [[ -n "${repository_url_ee}" ]]; then
287300
bash "${vagrant_dir}/scripts/host/m_switch_to_ee.sh" -f 2> >(logError)
288301
else
289302
bash "${vagrant_dir}/scripts/host/m_switch_to_ce.sh" -f 2> >(logError)
290303
fi
291-
fi
304+
#fi
292305

293306
success "Project initialization succesfully completed (make sure there are no errors in the log above)"
294307

295308
info "$(bold)[Important]$(regular)
296309
Please use $(bold)${vagrant_dir}$(regular) directory as PhpStorm project root, NOT $(bold)${magento_ce_dir}$(regular)."
297310

298-
if [[ ${host_os} == "Windows" ]] || [[ ${use_nfs} == 0 ]]; then
299-
info "$(bold)[Optional]$(regular)
300-
To verify that deployment configuration for $(bold)${magento_ce_dir}$(regular) in PhpStorm is correct,
301-
use instructions provided here: $(bold)https://github.com/paliarush/magento2-vagrant-for-developers/blob/2.0/docs/phpstorm-configuration-windows-hosts.md$(regular).
302-
If not using PhpStorm, you can set up synchronization using rsync"
303-
fi
311+
#if [[ ${host_os} == "Windows" ]] || [[ ${use_nfs} == 0 ]]; then
312+
# info "$(bold)[Optional]$(regular)
313+
# To verify that deployment configuration for $(bold)${magento_ce_dir}$(regular) in PhpStorm is correct,
314+
# use instructions provided here: $(bold)https://github.com/paliarush/magento2-vagrant-for-developers/blob/2.0/docs/phpstorm-configuration-windows-hosts.md$(regular).
315+
# If not using PhpStorm, you can set up synchronization using rsync"
316+
#fi
304317

305318
info "$(regular)See details in $(bold)${vagrant_dir}/log/${current_script_name}.log$(regular). For debug output set $(bold)debug:vagrant_project$(regular) to $(bold)1$(regular) in $(bold)etc/config.yaml$(regular)"

scripts/host/configure_php_storm.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ cp -R "${vagrant_dir}/scripts/host/php-storm-configs/." "${vagrant_dir}/.idea/"
1616
enabled_virtual_host_config="/etc/apache2/sites-available/magento2.conf"
1717

1818
host_os="$(bash "${vagrant_dir}/scripts/host/get_host_os.sh")"
19-
if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
20-
sed -i.back "s|<magento_guest_path>|/var/www/magento|g" "${vagrant_dir}/.idea/deployment.xml"
21-
sed -i.back 's|<auto_upload_attributes>| autoUpload="Always" autoUploadExternalChanges="true"|g' "${vagrant_dir}/.idea/deployment.xml"
22-
sed -i.back 's|<auto_upload_option>|<option name="myAutoUpload" value="ALWAYS" />|g' "${vagrant_dir}/.idea/deployment.xml"
23-
else
19+
#if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
20+
# sed -i.back "s|<magento_guest_path>|/var/www/magento|g" "${vagrant_dir}/.idea/deployment.xml"
21+
# sed -i.back 's|<auto_upload_attributes>| autoUpload="Always" autoUploadExternalChanges="true"|g' "${vagrant_dir}/.idea/deployment.xml"
22+
# sed -i.back 's|<auto_upload_option>|<option name="myAutoUpload" value="ALWAYS" />|g' "${vagrant_dir}/.idea/deployment.xml"
23+
#else
2424
sed -i.back "s|<magento_guest_path>|\$PROJECT_DIR\$/magento|g" "${vagrant_dir}/.idea/deployment.xml"
2525
sed -i.back 's|<auto_upload_attributes>||g' "${vagrant_dir}/.idea/deployment.xml"
2626
sed -i.back 's|<auto_upload_option>||g' "${vagrant_dir}/.idea/deployment.xml"
27-
fi
27+
#fi
2828

2929
sed -i.back "s|<host_name>|${magento_host_name}|g" "${vagrant_dir}/.idea/webServers.xml"
3030
sed -i.back "s|<ssh_port>|${ssh_port}|g" "${vagrant_dir}/.idea/webServers.xml"

scripts/host/install_php.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ incrementNestingLevel
99

1010
host_os="$(bash "${vagrant_dir}/scripts/host/get_host_os.sh")"
1111

12-
if [[ ${host_os} == "Windows" ]]; then
13-
curl http://windows.php.net/downloads/releases/archives/php-5.6.9-nts-Win32-VC11-x86.zip -o "${vagrant_dir}/lib/php.zip" 2> >(log) > >(log)
14-
unzip -q "${vagrant_dir}/lib/php.zip" -d "${vagrant_dir}/lib/php" 2> >(log) > >(log)
15-
rm -f "${vagrant_dir}/lib/php.zip"
16-
cp "${vagrant_dir}/lib/php/php.ini-development" "${vagrant_dir}/lib/php/php.ini"
17-
sed -i.back 's|; extension_dir = "ext"|extension_dir = "ext"|g' "${vagrant_dir}/lib/php/php.ini"
18-
sed -i.back 's|;extension=php_openssl.dll|extension=php_openssl.dll|g' "${vagrant_dir}/lib/php/php.ini"
19-
rm -rf "${vagrant_dir}/lib/php/*.back"
20-
fi
12+
#if [[ ${host_os} == "Windows" ]]; then
13+
# curl http://windows.php.net/downloads/releases/archives/php-5.6.9-nts-Win32-VC11-x86.zip -o "${vagrant_dir}/lib/php.zip" 2> >(log) > >(log)
14+
# unzip -q "${vagrant_dir}/lib/php.zip" -d "${vagrant_dir}/lib/php" 2> >(log) > >(log)
15+
# rm -f "${vagrant_dir}/lib/php.zip"
16+
# cp "${vagrant_dir}/lib/php/php.ini-development" "${vagrant_dir}/lib/php/php.ini"
17+
# sed -i.back 's|; extension_dir = "ext"|extension_dir = "ext"|g' "${vagrant_dir}/lib/php/php.ini"
18+
# sed -i.back 's|;extension=php_openssl.dll|extension=php_openssl.dll|g' "${vagrant_dir}/lib/php/php.ini"
19+
# rm -rf "${vagrant_dir}/lib/php/*.back"
20+
#fi
2121

2222
php_executable="$(bash "${vagrant_dir}/scripts/host/get_path_to_php.sh")"
2323
if ! ${php_executable} -v 2> >(log) | grep -q 'Copyright' ; then

scripts/host/k_rebuild_environment.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ while getopts 'de' flag; do
3030
esac
3131
done
3232

33-
# TODO: Make it work on OSX hosts
34-
# --set global.persistence.nfs.serverIp="$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')" \
33+
nfs_server_ip="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_nfs_server_ip")"
34+
echo "NFS SERVER IP: ${nfs_server_ip}"
35+
# TODO: Instead of enable_nfs use_nfs="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs")"
36+
# "$(if [[ ${use_nfs} == "1" ]]; then echo "true"; else echo "false"; fi)"
37+
#
3538
cd "${vagrant_dir}/etc/helm" && helm install \
3639
--name magento2 \
3740
--values values.yaml \
3841
--wait \
39-
--set global.persistence.nfs.serverIp="192.168.99.1" \
42+
--set global.persistence.nfs.serverIp="${nfs_server_ip}" \
4043
--set global.monolith.volumeHostPath="${vagrant_dir}" \
4144
--set global.persistence.nfs.enabled="${enable_nfs}" \
4245
--set global.checkout.enabled="${enable_checkout}" \

scripts/host/m_switch_to_ce.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ if [[ "${checkout_source_from}" == "git" ]]; then
4848
git checkout composer.json
4949
git checkout composer.lock
5050

51-
if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
52-
# Prevent issues on Windows with incorrect symlinks to files
53-
if [[ -f ${magento_ce_dir}/app/etc/aliases_to_classes_map.json ]]; then
54-
rm ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
55-
fi
56-
if [[ -f ${magento_ce_dir}/LICENSE_EE.txt ]] && [[ ! -L ${magento_ce_dir}/app/etc/enterprise ]]; then
57-
rm ${magento_ce_dir}/LICENSE_EE.txt
58-
rmdir ${magento_ce_dir}/app/etc/enterprise
59-
fi
60-
fi
51+
# if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
52+
# # Prevent issues on Windows with incorrect symlinks to files
53+
# if [[ -f ${magento_ce_dir}/app/etc/aliases_to_classes_map.json ]]; then
54+
# rm ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
55+
# fi
56+
# if [[ -f ${magento_ce_dir}/LICENSE_EE.txt ]] && [[ ! -L ${magento_ce_dir}/app/etc/enterprise ]]; then
57+
# rm ${magento_ce_dir}/LICENSE_EE.txt
58+
# rmdir ${magento_ce_dir}/app/etc/enterprise
59+
# fi
60+
# fi
6161
fi
6262

6363
bash "${vagrant_dir}/scripts/host/relink_sample_data.sh" 2> >(logError)
@@ -71,9 +71,9 @@ fi
7171

7272
bash "${vagrant_dir}/scripts/host/m_composer.sh" install 2> >(logError)
7373

74-
if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
75-
read -p "$(warning "[Action Required] Wait while Magento2 code is uploaded in PhpStorm and press any key to continue...")" -n1 -s
76-
fi
74+
#if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
75+
# read -p "$(warning "[Action Required] Wait while Magento2 code is uploaded in PhpStorm and press any key to continue...")" -n1 -s
76+
#fi
7777

7878
if [[ ${upgrade_only} -eq 1 ]]; then
7979
cd "${vagrant_dir}" && vagrant ssh -c 'chmod a+x ${MAGENTO_ROOT}/bin/magento' 2> >(logError)

scripts/host/m_switch_to_ee.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ if [[ "${checkout_source_from}" == "git" ]]; then
4141

4242
cp ${magento_ee_dir}/composer.lock ${magento_ce_dir}/composer.lock
4343

44-
if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
45-
# Prevent issues on Windows with incorrect symlinks to files
46-
if [[ -f ${magento_ee_dir}/app/etc/aliases_to_classes_map.json ]] && [[ -L ${magento_ce_dir}/app/etc/aliases_to_classes_map.json ]]; then
47-
rm ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
48-
cp ${magento_ee_dir}/app/etc/aliases_to_classes_map.json ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
49-
fi
50-
if [[ -f ${magento_ee_dir}/LICENSE_EE.txt ]] && [[ -L ${magento_ce_dir}/app/etc/enterprise ]]; then
51-
rm ${magento_ce_dir}/app/etc/enterprise
52-
mkdir ${magento_ce_dir}/app/etc/enterprise
53-
cp ${magento_ee_dir}/LICENSE_EE.txt ${magento_ce_dir}/LICENSE_EE.txt
54-
fi
55-
fi
44+
# if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
45+
# # Prevent issues on Windows with incorrect symlinks to files
46+
# if [[ -f ${magento_ee_dir}/app/etc/aliases_to_classes_map.json ]] && [[ -L ${magento_ce_dir}/app/etc/aliases_to_classes_map.json ]]; then
47+
# rm ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
48+
# cp ${magento_ee_dir}/app/etc/aliases_to_classes_map.json ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
49+
# fi
50+
# if [[ -f ${magento_ee_dir}/LICENSE_EE.txt ]] && [[ -L ${magento_ce_dir}/app/etc/enterprise ]]; then
51+
# rm ${magento_ce_dir}/app/etc/enterprise
52+
# mkdir ${magento_ce_dir}/app/etc/enterprise
53+
# cp ${magento_ee_dir}/LICENSE_EE.txt ${magento_ce_dir}/LICENSE_EE.txt
54+
# fi
55+
# fi
5656
fi
5757

5858
bash "${vagrant_dir}/scripts/host/relink_sample_data.sh" 2> >(logError)
@@ -70,9 +70,9 @@ if [[ "${checkout_source_from}" == "git" ]]; then
7070
cd ${magento_ce_dir} && git checkout composer.lock 2> >(logError) > >(log)
7171
fi
7272

73-
if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
74-
read -p "$(warning "[Action Required] Wait while Magento2 code is uploaded in PhpStorm and press any key to continue...")" -n1 -s
75-
fi
73+
#if [[ ${host_os} == "Windows" ]] || [[ $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
74+
# read -p "$(warning "[Action Required] Wait while Magento2 code is uploaded in PhpStorm and press any key to continue...")" -n1 -s
75+
#fi
7676

7777
if [[ ${upgrade_only} -eq 1 ]]; then
7878
cd "${vagrant_dir}" && vagrant ssh -c 'chmod a+x ${MAGENTO_ROOT}/bin/magento' 2> >(logError)

tests/include/assertions.sh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
function executeCommonAssertions()
66
{
7+
# TODO: Implement functionality and uncomment assertions
78
# assertPhpStormConfigured
89

910
# Make sure Magento was installed and is accessible
@@ -16,19 +17,19 @@ function executeCommonAssertions()
1617
# assertApacheRestartWorks
1718
# assertMagentoFrontendAccessible
1819
#
19-
# # Make sure Magento reinstall script works
20-
# assertMagentoReinstallWorks
21-
# assertMagentoFrontendAccessible
22-
#
20+
# Make sure Magento reinstall script works
21+
assertMagentoReinstallWorks
22+
assertMagentoFrontendAccessible
23+
2324
# assertEmailLoggingWorks
24-
#
25+
2526
# # Check if varnish can be enabled/disabled
2627
# assertVarnishEnablingWorks
2728
# assertVarnishDisablingWorks
28-
#
29-
# # Test search
30-
# createSimpleProduct
31-
# assertSearchWorks
29+
30+
# Test search
31+
createSimpleProduct
32+
assertSearchWorks
3233
}
3334

3435
## Assertions
@@ -110,7 +111,7 @@ function assertMagentoReinstallWorks()
110111
echo "## assertMagentoReinstallWorks" >>${current_log_file_path}
111112
cd "${vagrant_dir}"
112113
bash m-reinstall >>${current_log_file_path} 2>&1
113-
pattern="Access storefront at .*(http\://magento2\.vagrant[0-9/:\.]+).*"
114+
pattern="Access storefront at .*(http\://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/.*"
114115
if [[ ${debug_vagrant_project} -eq 1 ]]; then
115116
tail_number=300
116117
else
@@ -126,7 +127,7 @@ function assertMagentoSwitchToEeWorks()
126127
echo "## assertMagentoSwitchToEeWorks" >>${current_log_file_path}
127128
cd "${vagrant_dir}"
128129
bash m-switch-to-ee -f >>${current_log_file_path} 2>&1
129-
pattern="Access storefront at .*(http\://magento2\.vagrant[0-9/:\.]+).*"
130+
pattern="Access storefront at .*(http\://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/.*"
130131
output_log="$(tail -n5 ${current_log_file_path})"
131132
assertTrue 'Magento switch to EE failed (Frontend URL is not available in the output)' '[[ ${output_log} =~ ${pattern} ]]'
132133
}
@@ -137,7 +138,7 @@ function assertMagentoSwitchToCeWorks()
137138
echo "## assertMagentoSwitchToCeWorks" >>${current_log_file_path}
138139
cd "${vagrant_dir}"
139140
bash m-switch-to-ce -f >>${current_log_file_path} 2>&1
140-
pattern="Access storefront at .*(http\://magento2\.vagrant[0-9/:\.]+).*"
141+
pattern="Access storefront at .*(http\://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/.*"
141142
output_log="$(tail -n5 ${current_log_file_path})"
142143
assertTrue 'Magento switch to CE failed (Frontend URL is not available in the output)' '[[ ${output_log} =~ ${pattern} ]]'
143144
}

0 commit comments

Comments
 (0)