mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-02-21 09:51:50 +00:00
Fix tests crash on travis
This commit is contained in:
parent
dfd18f9483
commit
c03c66ec48
@ -7,7 +7,6 @@ before_install:
|
|||||||
- sudo add-apt-repository ppa:gns3/ppa -y
|
- sudo add-apt-repository ppa:gns3/ppa -y
|
||||||
- sudo apt-get update -q
|
- sudo apt-get update -q
|
||||||
- sudo apt-get install dynamips
|
- sudo apt-get install dynamips
|
||||||
- sudo apt-get install python3-netifaces
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python setup.py install
|
- python setup.py install
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import os
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
def test_udp_allocation(server, project):
|
def test_udp_allocation(server, project):
|
||||||
response = server.post('/projects/{}/ports/udp'.format(project.id), {}, example=True)
|
response = server.post('/projects/{}/ports/udp'.format(project.id), {}, example=True)
|
||||||
@ -22,6 +25,8 @@ def test_udp_allocation(server, project):
|
|||||||
assert response.json == {'udp_port': 10000}
|
assert response.json == {'udp_port': 10000}
|
||||||
|
|
||||||
|
|
||||||
|
# Netfifaces is not available on Travis
|
||||||
|
@pytest.skipif(os.environ.get("TRAVIS", False))
|
||||||
def test_interfaces(server):
|
def test_interfaces(server):
|
||||||
response = server.get('/interfaces', example=True)
|
response = server.get('/interfaces', example=True)
|
||||||
assert response.status == 200
|
assert response.status == 200
|
||||||
|
Loading…
x
Reference in New Issue
Block a user