minor fixes, added gitignore

This commit is contained in:
Gleb Boushev
2020-12-11 13:08:33 +03:00
parent e3c1004ba9
commit 3348fd434a
3 changed files with 147 additions and 4 deletions

142
.gitignore vendored Normal file
View File

@@ -0,0 +1,142 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
docker/*
!docker/nightly*
docker/nightly*log

View File

@@ -61,7 +61,7 @@ logging.info("------------------------")
logging.info("nightly sanity run start")
# ap details, test data and test config
with open("test_config.json") as json_file:
with open("nightly_test_config.json") as json_file:
TEST_DATA = json.load(json_file)
TESTRAIL = {
True: {
@@ -187,7 +187,7 @@ class TestRail_Client:
f"add_run/{project_id}",
{"name": name, "case_ids": case_ids, "include_all": False}
)
logging.debug(result.json())
logging.debug(result)
return result["id"]
# Class for jFrog Interaction
@@ -278,7 +278,7 @@ class CloudSDK_Client:
def set_ap_profile(self, equipment_id, test_profile_id):
url = f"{self.baseUrl}/portal/equipment?equipmentId={equipment_id}"
response = requests.get(url, headers=self.headers)
logging.info(response)
logging.debug(response.json())
# Add Lab Profile ID to Equipment
equipment_info = response.json()
@@ -387,6 +387,7 @@ for model in TEST_DATA["ap_models"].keys():
testrail_project_id = testrail.get_project_id(project_name=command_line_args.testrail_project)
runId = testrail.create_testrun(name=test_run_name, case_ids=( [*test_cases_data] + firmware_update_case ), project_id=testrail_project_id)
logging.info(f"Testrail project id: {testrail_project_id}; run ID is: {runId}")
import pdb; pdb.set_trace()
# Check if upgrade worked
if command_line_args.update_firmware:
@@ -404,7 +405,7 @@ for model in TEST_DATA["ap_models"].keys():
# Run Client Single Connectivity Test Cases
for testcase in test_cases_data.keys():
if test_cases_data[testcase]["ssid_name"] != "skip":
logging.info(f"Test parameters are\n radio: {test_cases_data[testcase]['radio']}\n ssid_name: {test_cases_data[testcase]['ssid_name']}\n ssid_psk: {test_cases_data[testcase]['ssid_psk']}\n security: {test_cases_data[testcase]['security']}\n station: {test_cases_data[testcase]['station']}\n testcase: {testcase}")
logging.info(f"Test parameters are: radio = {test_cases_data[testcase]['radio']}\n ssid_name = {test_cases_data[testcase]['ssid_name']}\n ssid_psk = {test_cases_data[testcase]['ssid_psk']}\n security = {test_cases_data[testcase]['security']}\n station = {test_cases_data[testcase]['station']}\n testcase = {testcase}")
staConnect = StaConnect2(command_line_args.lanforge_ip_address, command_line_args.lanforge_port_number, debug_ = False)
staConnect.sta_mode = 0
staConnect.upstream_resource = 1