diff options
author | kshithijiyer <kshithij.ki@gmail.com> | 2020-09-04 14:06:58 +0530 |
---|---|---|
committer | kshithijiyer <kshithij.ki@gmail.com> | 2020-09-04 14:57:27 +0530 |
commit | 2f49a0d95a8ce7a3b704a24fd7b034e7e671bbbc (patch) | |
tree | fb4a7ed0e390df0ec9022a96ef03ab7f8599bcb3 /tests/functional/dht | |
parent | 41f7f4eac5c629e7ebfdb227ecc7ac3acf2133bd (diff) |
[Testfix] Fix hostname issue with special file cases
Problem:
The code fails if we have give hostname in glusto-tests
config file. This is becuase we have a converstion logic
present in the testcase which converts IP to hostname.
Solution:
Adding code to check if it's an IP and then only
run the code to convert it.
Change-Id: I3bb1a566d469a4c32161c91fa610da378d46e77e
Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'tests/functional/dht')
-rw-r--r-- | tests/functional/dht/test_pipe_character_and_block_device_files.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/functional/dht/test_pipe_character_and_block_device_files.py b/tests/functional/dht/test_pipe_character_and_block_device_files.py index 02e7f8f3f..8a3739b83 100644 --- a/tests/functional/dht/test_pipe_character_and_block_device_files.py +++ b/tests/functional/dht/test_pipe_character_and_block_device_files.py @@ -147,9 +147,9 @@ class TestPipeCharacterAndBlockDeviceFiles(GlusterBaseClass): self.assertTrue(ret, "Unable to find file {} on brick {}" .format(fname, path)) brick_text = brick_path.split('/')[:-1] - brick_text[0] = gethostbyname(brick_text[0][:-1]) + ":" - present_brick_list.append( - '/'.join(brick_text)) + if brick_text[0][0:2].isdigit(): + brick_text[0] = gethostbyname(brick_text[0][:-1]) + ":" + present_brick_list.append('/'.join(brick_text)) # Check on other bricks where file doesn't exist brick_list = get_all_bricks(self.mnode, self.volname) |