unittests: use 0.1.2.3 for device IPs
We use 1.1.1.1 as a "dummy" IP in unittests when we need a host that
doesn't exist. However, it is a real valid IP, so if our tests aren't
mocked correctly, we might attempt to ping/ssh/etc... the remote. Use
0.1.2.3 instead as it's a valid IP and has been reserved by the spec
as a non-routable or connectable address. It will fail immediately.
BUG=chromium:997354
TEST=`./run_tests` passes
Change-Id: Ied2c902d9d41093e1dd5bdebde54816d054b20ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1932722
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/cli/flash_unittest.py b/cli/flash_unittest.py
index 23cc77d..3e398db 100644
--- a/cli/flash_unittest.py
+++ b/cli/flash_unittest.py
@@ -69,7 +69,7 @@
IMAGE = '/path/to/image'
DEVICE = commandline.Device(scheme=commandline.DEVICE_SCHEME_SSH,
- hostname='1.1.1.1')
+ hostname=remote_access.TEST_IP)
def setUp(self):
"""Patches objects."""