Update Grafana version
This brings the Grafana version up to the current version and fixes the selenium helm and gate test for the new login dashboard. Change-Id: I0b65412f4689c763b3f035055ecbb4ca63c21048
This commit is contained in:
@@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
appVersion: v6.2.0
|
appVersion: v7.3.6
|
||||||
description: OpenStack-Helm Grafana
|
description: OpenStack-Helm Grafana
|
||||||
name: grafana
|
name: grafana
|
||||||
version: 0.1.1
|
version: 0.1.2
|
||||||
home: https://grafana.com/
|
home: https://grafana.com/
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/grafana/grafana
|
- https://github.com/grafana/grafana
|
||||||
|
@@ -71,12 +71,9 @@ except TimeoutException:
|
|||||||
|
|
||||||
logger.info("Attempting to log into Grafana dashboard")
|
logger.info("Attempting to log into Grafana dashboard")
|
||||||
try:
|
try:
|
||||||
browser.find_element_by_name('username').send_keys(username)
|
browser.find_element_by_name('user').send_keys(username)
|
||||||
browser.find_element_by_name('password').send_keys(password)
|
browser.find_element_by_name('password').send_keys(password)
|
||||||
browser.find_element_by_css_selector(
|
browser.find_element_by_class_name('css-6ntnx5-button').click()
|
||||||
'body > grafana-app > div.main-view > div > div:nth-child(1) > div > '
|
|
||||||
'div > div.login-outer-box > div.login-inner-box > form > div.login-button-group > button'
|
|
||||||
).click()
|
|
||||||
logger.info("Successfully logged in to Grafana")
|
logger.info("Successfully logged in to Grafana")
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
logger.error("Failed to log in to Grafana")
|
logger.error("Failed to log in to Grafana")
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
---
|
---
|
||||||
images:
|
images:
|
||||||
tags:
|
tags:
|
||||||
grafana: docker.io/grafana/grafana:6.2.0
|
grafana: docker.io/grafana/grafana:7.3.6
|
||||||
dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0
|
dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0
|
||||||
db_init: docker.io/openstackhelm/heat:stein-ubuntu_bionic
|
db_init: docker.io/openstackhelm/heat:stein-ubuntu_bionic
|
||||||
grafana_db_session_sync: docker.io/openstackhelm/heat:stein-ubuntu_bionic
|
grafana_db_session_sync: docker.io/openstackhelm/heat:stein-ubuntu_bionic
|
||||||
|
@@ -23,11 +23,10 @@ st = SeleniumTester('Grafana')
|
|||||||
username = st.get_variable('GRAFANA_USER')
|
username = st.get_variable('GRAFANA_USER')
|
||||||
password = st.get_variable('GRAFANA_PASSWORD')
|
password = st.get_variable('GRAFANA_PASSWORD')
|
||||||
grafana_uri = st.get_variable('GRAFANA_URI')
|
grafana_uri = st.get_variable('GRAFANA_URI')
|
||||||
grafana_url = 'http://{}'.format(grafana_uri)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
st.logger.info('Attempting to connect to Grafana')
|
st.logger.info('Attempting to connect to Grafana')
|
||||||
st.browser.get(grafana_url)
|
st.browser.get(grafana_uri)
|
||||||
el = WebDriverWait(st.browser, 15).until(
|
el = WebDriverWait(st.browser, 15).until(
|
||||||
EC.title_contains('Grafana')
|
EC.title_contains('Grafana')
|
||||||
)
|
)
|
||||||
@@ -37,52 +36,15 @@ except TimeoutException:
|
|||||||
st.browser.quit()
|
st.browser.quit()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
logger.info("Attempting to log into Grafana dashboard")
|
||||||
try:
|
try:
|
||||||
st.logger.info('Attempting to login to Grafana')
|
browser.find_element_by_name('user').send_keys(username)
|
||||||
st.browser.find_element_by_name('username').send_keys(username)
|
browser.find_element_by_name('password').send_keys(password)
|
||||||
st.browser.find_element_by_name('password').send_keys(password)
|
browser.find_element_by_class_name('css-6ntnx5-button').click()
|
||||||
st.browser.find_element_by_css_selector(
|
logger.info("Successfully logged in to Grafana")
|
||||||
'body > grafana-app > div.main-view > div > div:nth-child(1) > div > '
|
|
||||||
'div > div.login-outer-box > div.login-inner-box > form > div.login-button-group > button'
|
|
||||||
).click()
|
|
||||||
st.logger.info("Successfully logged in to Grafana")
|
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
st.logger.error("Failed to log in to Grafana")
|
logger.error("Failed to log in to Grafana")
|
||||||
st.browser.quit()
|
browser.quit()
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
try:
|
|
||||||
st.logger.info('Attempting to visit Nodes dashboard')
|
|
||||||
st.click_link_by_name('OSH Home')
|
|
||||||
st.click_link_by_name('Nodes')
|
|
||||||
el = WebDriverWait(st.browser, 15).until(
|
|
||||||
EC.presence_of_element_located(
|
|
||||||
(By.XPATH, '/html/body/grafana-app/div/div/div/react-container/div'
|
|
||||||
'/div[2]/div/div[1]/div/div/div[1]/div/div/div/plugin-component'
|
|
||||||
'/panel-plugin-graph/grafana-panel/div/div[2]')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
st.take_screenshot('Grafana Nodes')
|
|
||||||
except TimeoutException:
|
|
||||||
st.logger.error('Failed to load Nodes dashboard')
|
|
||||||
st.browser.quit()
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
try:
|
|
||||||
st.logger.info('Attempting to visit Cluster Status dashboard')
|
|
||||||
st.click_link_by_name('Nodes')
|
|
||||||
st.click_link_by_name('Kubernetes Cluster Status')
|
|
||||||
el = WebDriverWait(st.browser, 15).until(
|
|
||||||
EC.presence_of_element_located(
|
|
||||||
(By.XPATH, '/html/body/grafana-app/div/div/div/react-container/div'
|
|
||||||
'/div[2]/div/div[1]/div/div/div[5]/div/div/div/plugin-component'
|
|
||||||
'/panel-plugin-singlestat/grafana-panel/div')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
st.take_screenshot('Grafana Cluster Status')
|
|
||||||
except TimeoutException:
|
|
||||||
st.logger.error('Failed to load Cluster Status dashboard')
|
|
||||||
st.browser.quit()
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
st.browser.quit()
|
st.browser.quit()
|
||||||
|
Reference in New Issue
Block a user