YunoHost / package_check

Shell script which check package actions: install, remove, upgrade, backup, restore…
GNU General Public License v3.0
21 stars 25 forks source link

Retrieve only one IP address #127

Closed yalh76 closed 2 years ago

yalh76 commented 2 years ago

I was struggling on some package_check without understanding the result of the [Test 2/6] Installation on the root test: https://ci-apps-dev.yunohost.org/ci/job/3189

Error: Connection error...
Warning: Test URL: sub.domain.tld
Real URL: curl: no URL specified!

curl: try 'curl --help' or 'curl --manual' for more information

/bin/bash: line 2: 192.168.47.254: command not found

/bin/bash: line 3: 192.168.47.254: command not found

/bin/bash: line 4: 192.168.47.254: command not found

/bin/bash: line 5: 192.168.47.254: command not found

HTTP code: curl: no URL specified!

curl: try 'curl --help' or 'curl --manual' for more information

/bin/bash: line 2: 192.168.47.254: command not found

/bin/bash: line 3: 192.168.47.254: command not found

/bin/bash: line 4: 192.168.47.254: command not found

/bin/bash: line 5: 192.168.47.254: command not found

Page title: 
Page extract:
   cat: ./curl_output: No such file or directory

After some digging, I don't know why, sometimes the LXC has 2 ip addresses ... image

So I manage to only retrieve one of them, so when doing : https://github.com/YunoHost/package_check/blob/f9dafe3a41412a7136e4700f4b046ea977aef4d3/lib/tests.sh#L215-L224

LXC_IP value will be: 192.168.47.115 instead of

192.168.47.115
192.168.47.114