forked from splunk/splunk-connect-for-snmp
-
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.
- Loading branch information
1 parent
37a3ac7
commit 3465cea
Showing
11 changed files
with
825 additions
and
45 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 |
---|---|---|
@@ -1,38 +1,22 @@ | ||
import time | ||
|
||
import pytest | ||
from selenium import webdriver | ||
from selenium.webdriver.chrome.options import Options | ||
import config.config as config | ||
# from webdriver_manager.chrome import ChromeDriverManager | ||
from selenium.webdriver.chrome.service import Service as ChromeService | ||
from webdriver_manager.chrome import ChromeDriverManager | ||
|
||
from webdriver.webriver_factory import WebDriverFactory | ||
from logger.logger import Logger | ||
|
||
logger = Logger().get_logger() | ||
|
||
|
||
# @pytest.fixture(scope="function") | ||
# def driver(): | ||
# logger.info(f"Execution type: {config.EXECUTION_TYPE}") | ||
# chrome_options = Options() | ||
# if config.EXECUTION_TYPE != "local": | ||
# chrome_options.add_argument("--headless") | ||
# chrome_options.add_argument("--disable-gpu") | ||
# chrome_options.add_argument("--window-size=1920x1080") | ||
# # web_driver = webdriver.Chrome(options=chrome_options) | ||
# | ||
# web_driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=chrome_options) | ||
# | ||
# if config.EXECUTION_TYPE != "local": | ||
# web_driver.maximize_window() | ||
# url = "http://10.202.2.199:30001/" | ||
# web_driver.get(url) | ||
# time.sleep(5) | ||
# return web_driver | ||
@pytest.fixture(scope="function") | ||
def setup(request): | ||
config = {} | ||
host = request.config.getoption("--splunk-host") | ||
config["splunkd_url"] = "https://" + host + ":8089" | ||
config["splunk_user"] = request.config.getoption("--splunk-user") | ||
config["splunk_password"] = request.config.getoption("--splunk-password") | ||
|
||
return config | ||
|
||
|
||
def pytest_unconfigure(): | ||
logger.info("Closing Web Driver") | ||
WebDriverFactory.close_driver() | ||
|
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[pytest] | ||
addopts = -rfps --durations=10 --disable-pytest-warnings --continue-on-collection-errors | ||
;log_level = INFO | ||
log_level = DEBUG | ||
log_level = INFO | ||
;addopts = -rfps --durations=10 --disable-pytest-warnings --continue-on-collection-errors | ||
|
||
;log_level = DEBUG |
Oops, something went wrong.