forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[config]: Add loopback interfaces to interface name checker (sonic-ne…
…t#1869) * Add loopback interfaces to interface name checker Signed-off-by: Ze Gan <ganze718@gmail.com> * Add unitest for interface name checker Signed-off-by: Ze Gan <ganze718@gmail.com>
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from unittest import mock | ||
|
||
from utilities_common.db import Db | ||
|
||
import config.main as config | ||
|
||
|
||
def test_interface_name_checker(): | ||
db = Db() | ||
db.cfgdb.set_entry("LOOPBACK_INTERFACE", "Loopback0", {"NULL": "NULL"}) | ||
|
||
assert config.interface_name_is_valid(db.cfgdb, "Loopback0") |