Skip to content

Commit

Permalink
[tests]: rename sonic-utilitie-tests to tests (sonic-net#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
lguohan committed Aug 3, 2020
1 parent c0c3cce commit 216688e
Show file tree
Hide file tree
Showing 39 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If this is a bug fix, make sure your description includes "closes #xxxx",
issue when the PR is merged.
If you are adding/modifying/removing any command or utility script, please also
make sure to add/modify/remove any unit tests from the sonic-utilities-tests
make sure to add/modify/remove any unit tests from the tests
directory as appropriate.
If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
Expand Down
2 changes: 1 addition & 1 deletion scripts/dropconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ from tabulate import tabulate
try:
if os.environ["UTILITIES_UNIT_TESTING"] == "1":
modules_path = os.path.join(os.path.dirname(__file__), "..")
test_path = os.path.join(modules_path, "sonic-utilities-tests")
test_path = os.path.join(modules_path, "tests")
sys.path.insert(0, modules_path)
sys.path.insert(0, test_path)
import mock_tables.dbconnector
Expand Down
2 changes: 1 addition & 1 deletion scripts/dropstat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ from natsort import natsorted
try:
if os.environ["UTILITIES_UNIT_TESTING"] == "1":
modules_path = os.path.join(os.path.dirname(__file__), "..")
test_path = os.path.join(modules_path, "sonic-utilities-tests")
test_path = os.path.join(modules_path, "tests")
sys.path.insert(0, modules_path)
sys.path.insert(0, test_path)
import mock_tables.dbconnector
Expand Down
2 changes: 1 addition & 1 deletion scripts/gearboxutil
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import os
try:
if os.environ["UTILITIES_UNIT_TESTING"] == "1":
modules_path = os.path.join(os.path.dirname(__file__), "..")
tests_path = os.path.join(modules_path, "sonic-utilities-tests")
tests_path = os.path.join(modules_path, "tests")
sys.path.insert(0, modules_path)
sys.path.insert(0, tests_path)
import mock_tables.dbconnector
Expand Down
2 changes: 1 addition & 1 deletion scripts/intfstat
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import time
try:
if os.environ["UTILITIES_UNIT_TESTING"] == "1":
modules_path = os.path.join(os.path.dirname(__file__), "..")
test_path = os.path.join(modules_path, "sonic-utilities-tests")
test_path = os.path.join(modules_path, "tests")
sys.path.insert(0, modules_path)
sys.path.insert(0, test_path)
import mock_tables.dbconnector
Expand Down
2 changes: 1 addition & 1 deletion scripts/intfutil
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import os
try:
if os.environ["UTILITIES_UNIT_TESTING"] == "1":
modules_path = os.path.join(os.path.dirname(__file__), "..")
tests_path = os.path.join(modules_path, "sonic-utilities-tests")
tests_path = os.path.join(modules_path, "tests")
sys.path.insert(0, modules_path)
sys.path.insert(0, tests_path)
import mock_tables.dbconnector
Expand Down
2 changes: 1 addition & 1 deletion scripts/psushow
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ from tabulate import tabulate
try:
if os.environ["UTILITIES_UNIT_TESTING"] == "1":
modules_path = os.path.join(os.path.dirname(__file__), "..")
test_path = os.path.join(modules_path, "sonic-utilities-tests")
test_path = os.path.join(modules_path, "tests")
sys.path.insert(0, modules_path)
sys.path.insert(0, test_path)
import mock_tables.dbconnector
Expand Down
2 changes: 1 addition & 1 deletion scripts/sfpshow
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ from tabulate import tabulate
try:
if os.environ["UTILITIES_UNIT_TESTING"] == "1":
modules_path = os.path.join(os.path.dirname(__file__), "..")
test_path = os.path.join(modules_path, "sonic-utilities-tests")
test_path = os.path.join(modules_path, "tests")
sys.path.insert(0, modules_path)
sys.path.insert(0, test_path)
import mock_tables.dbconnector
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
'show',
'sonic_installer',
'sonic_installer.bootloader',
'sonic-utilities-tests',
'tests',
'undebug',
'utilities_common',
'watchdogutil',
],
package_data={
'show': ['aliases.ini'],
'sonic-utilities-tests': ['acl_input/*', 'mock_tables/*.py', 'mock_tables/*.json', 'filter_fdb_input/*']
'tests': ['acl_input/*', 'mock_tables/*.py', 'mock_tables/*.json', 'filter_fdb_input/*']
},
scripts=[
'scripts/aclshow',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@
],
},
{
"arp": "sonic-utilities-tests/filter_fdb_input/arp.json",
"fdb": "sonic-utilities-tests/filter_fdb_input/fdb.json",
"config_db": "sonic-utilities-tests/filter_fdb_input/config_db.json",
"expected_fdb": "sonic-utilities-tests/filter_fdb_input/expected_fdb.json"
"arp": "tests/filter_fdb_input/arp.json",
"fdb": "tests/filter_fdb_input/fdb.json",
"config_db": "tests/filter_fdb_input/config_db.json",
"expected_fdb": "tests/filter_fdb_input/expected_fdb.json"
},
{
"arp": "sonic-utilities-tests/filter_fdb_input/arp.json",
"fdb": "sonic-utilities-tests/filter_fdb_input/fdb.json",
"arp": "tests/filter_fdb_input/arp.json",
"fdb": "tests/filter_fdb_input/fdb.json",
"config_db": {
"VLAN": {
"Vlan1": {}
Expand All @@ -263,8 +263,8 @@
],
},
{
"arp": "sonic-utilities-tests/filter_fdb_input/arp.json",
"fdb": "sonic-utilities-tests/filter_fdb_input/fdb.json",
"arp": "tests/filter_fdb_input/arp.json",
"fdb": "tests/filter_fdb_input/fdb.json",
"config_db": {
},
"expected_fdb": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sys.path.insert(0, test_path)
sys.path.insert(0, modules_path)

import mock_tables.dbconnector # required by sonic-utilities-tests
import mock_tables.dbconnector # required by tests

import show.main as show

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 216688e

Please sign in to comment.