Fix the CI gate failure
The root cause is getting a error ip address for Zaqar service. Change-Id: I879a4e0115e583b9752301a9d8167f77a70ca187
This commit is contained in:
		@@ -13,6 +13,7 @@
 | 
			
		||||
# See the License for the specific language governing permissions and
 | 
			
		||||
# limitations under the License.
 | 
			
		||||
 | 
			
		||||
import subprocess
 | 
			
		||||
from unittest import mock
 | 
			
		||||
 | 
			
		||||
from oslo_utils import netutils
 | 
			
		||||
@@ -21,14 +22,18 @@ from zaqarclient.queues import client
 | 
			
		||||
from zaqarclient.tests import base
 | 
			
		||||
from zaqarclient.tests.transport import dummy
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
MY_IP = netutils.get_my_ipv4()
 | 
			
		||||
cmd = 'cat /etc/zaqar/uwsgi.conf | grep http'
 | 
			
		||||
MY_HOST_IP = subprocess.run(cmd, shell=True, capture_output=True, text=True)
 | 
			
		||||
if len(MY_HOST_IP.stdout.split("= ")) < 2:
 | 
			
		||||
    MY_IP = netutils.get_my_ipv4() + ':8888'
 | 
			
		||||
else:
 | 
			
		||||
    MY_IP = MY_HOST_IP.stdout.split("= ")[1]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class QueuesTestBase(base.TestBase):
 | 
			
		||||
 | 
			
		||||
    transport_cls = dummy.DummyTransport
 | 
			
		||||
    url = 'http://%s:8888' % MY_IP
 | 
			
		||||
    url = 'http://%s' % MY_IP
 | 
			
		||||
    version = 1
 | 
			
		||||
 | 
			
		||||
    def setUp(self):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user