Skip to content

Commit

Permalink
Trying
Browse files Browse the repository at this point in the history
  • Loading branch information
turulomio committed Mar 28, 2024
1 parent 126a3f4 commit f932a12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,12 @@ jobs:
sudo apt-get install libreoffice python3-uno
sudo pip install pytest
sudo pip install .
- name: Launch unogenerator_start
- name: Launch unogenerator_start testing all commands
run: |
sudo unogenerator_start --instances 4
- name: Monitor things
run: |
sudo netstat -nputa
sudo unogenerator_monitor
- name: Run pytest
run: |
sudo pytest tests/test_commons.py tests/test_demo.py tests/test_helpers.py tests/test_server.py
- name: Monitor things
run: |
sudo netstat -nputa
sudo unogenerator_start --instances 1
sudo unogenerator_monitor
- name: Launch unogenerator_restart
run: |
sudo unogenerator_stop
sudo unogenerator_start --instances 4
- name: Run pytest
run: |
sudo pytest tests/test_unogenerator.py
- name: Monitor things
run: |
sudo netstat -nputa
sudo unogenerator_monitor
sudo pytest
18 changes: 10 additions & 8 deletions tests/test_server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from unogenerator import can_import_uno, commons
if can_import_uno():
from unogenerator.server import command_monitor, is_port_opened, is_server_working, command_stop, command_start
from unogenerator.server import command_monitor, is_port_opened, is_server_working


def test_command_monitor():
Expand All @@ -14,11 +14,13 @@ def test_is_port_opened():
is_port_opened("localhost", 2002)
is_port_opened("localhost", 90)

def test_command_start():
if commons.is_root():
command_start(1, 45000)

def test_command_stop():
if commons.is_root():
command_stop()

# THIS TEST SHOULD NOT BE USED. GITHUB ACTIONS STOPS THE SERVER AND THE REST OF TESTS FAIL
# def test_command_start():
# if commons.is_root():
# command_start(1, 2002)
#
# def test_command_stop():
# if commons.is_root():
# command_stop()

0 comments on commit f932a12

Please sign in to comment.