Enabled add gateway to refrain from checking exit code
Fixes bug 1129741 Change-Id: Ibb9a0e1c0f0e5ad610c4f45ae65eb82e25a57b94
This commit is contained in:
parent
2f7a01c2e8
commit
a757406792
@ -297,7 +297,7 @@ class IpRouteCommand(IpDeviceCommandBase):
|
||||
COMMAND = 'route'
|
||||
|
||||
def add_gateway(self, gateway, metric=None):
|
||||
args = ['add', 'default', 'via', gateway]
|
||||
args = ['replace', 'default', 'via', gateway]
|
||||
if metric:
|
||||
args += ['metric', metric]
|
||||
args += ['dev', self.name]
|
||||
|
@ -548,7 +548,7 @@ class TestIpRouteCommand(TestIPCmdBase):
|
||||
metric = 100
|
||||
self.route_cmd.add_gateway(gateway, metric)
|
||||
self._assert_sudo([],
|
||||
('add', 'default', 'via', gateway,
|
||||
('replace', 'default', 'via', gateway,
|
||||
'metric', metric,
|
||||
'dev', self.parent.name))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user