Skip to content

Commit bdd5f1e

Browse files
jscotkamartinpitt
authored andcommitted
create module for selenium libraries
Closes cockpit-project#10675
1 parent f1de4e5 commit bdd5f1e

25 files changed

+27
-32
lines changed

test/avocado/checkexample-foo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import sys
2424
import os
2525
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
26-
import cockpit
26+
from testlib_avocado import cockpit
2727

2828

2929
class checkexample_foo(Test):

test/avocado/checklogin-basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
import sys
2424
import os
2525
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
26-
import cockpit
26+
27+
from testlib_avocado import cockpit
2728

2829
username = "user"
2930

test/avocado/checklogin-raw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import sys
2828
import os
2929
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
30-
import cockpit
30+
from testlib_avocado import cockpit
3131

3232

3333
machine = "localhost"

test/avocado/checkrealms-basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from avocado.utils import process
2323

2424
from testlib import wait
25-
import cockpit
25+
from testlib_avocado import cockpit
2626

2727
class checkrealms_basic(cockpit.Test):
2828
def test(self):

test/avocado/common

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/avocado/identity

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/avocado/identity.pub

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/avocado/machine_core

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/avocado/run-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
2828
if CURRENT_DIR not in sys.path:
2929
sys.path.insert(1, CURRENT_DIR)
3030

31-
from machine_core import testvm
31+
from testlib_avocado.machine_core import testvm
3232

3333
machine_test_dir = "/tmp/avocado_tests"
3434

test/avocado/selenium-base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77
if not machine_test_dir in sys.path:
88
sys.path.insert(1, machine_test_dir)
99

10-
from seleniumlib import SeleniumTest, user, clickable, passwd, visible
10+
from testlib_avocado.seleniumlib import SeleniumTest, user, clickable, passwd, visible
1111

1212
class BasicTestSuite(SeleniumTest):
1313
"""
1414
:avocado: enable
1515
"""
1616
def test10Base(self):
17+
# this is minimal cockpit test what checks login page
1718
self.wait_id('server-name')
1819
self.error = False
1920

2021
def test15BaseSSHKeyAdded(self):
22+
# calling self.login() ensures there is added public ssh key to user to be able to call
23+
# machine.execute(...)
2124
self.login()
2225
self.logout()
2326
out = self.machine.execute("hostname")

0 commit comments

Comments
 (0)