File tree Expand file tree Collapse file tree 3 files changed +21
-26
lines changed Expand file tree Collapse file tree 3 files changed +21
-26
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) Jupyter Development Team.
2+ # Distributed under the terms of the Modified BSD License.
3+ import requests
4+
5+ from tests .conftest import TrackedContainer
6+ from tests .pluto_check import check_pluto_proxy
7+
8+
9+ def test_pluto_proxy (
10+ container : TrackedContainer , http_client : requests .Session
11+ ) -> None :
12+ """Pluto proxy starts Pluto correctly"""
13+ check_pluto_proxy (container , http_client )
Original file line number Diff line number Diff line change 1- import logging
2- import secrets
3- import time
4-
1+ # Copyright (c) Jupyter Development Team.
2+ # Distributed under the terms of the Modified BSD License.
53import requests
64
7- from tests .conftest import TrackedContainer , find_free_port
8-
9- LOGGER = logging .getLogger (__name__ )
5+ from tests .conftest import TrackedContainer
6+ from tests .pluto_check import check_pluto_proxy
107
118
129def test_pluto_proxy (
1310 container : TrackedContainer , http_client : requests .Session
1411) -> None :
1512 """Pluto proxy starts Pluto correctly"""
16- host_port = find_free_port ()
17- token = secrets .token_hex ()
18- container .run_detached (
19- command = [
20- "start.sh" ,
21- "jupyter" ,
22- "lab" ,
23- "--port=8888" ,
24- f"--LabApp.token={ token } " ,
25- ],
26- ports = {"8888/tcp" : host_port },
27- )
28- # Give the server a bit of time to start
29- time .sleep (3 )
30- resp = http_client .get (f"http://localhost:{ host_port } /pluto?token={ token } " )
31- resp .raise_for_status ()
32- assert "Pluto.jl notebooks" in resp .text , "Pluto.jl text not found in /pluto page"
13+ check_pluto_proxy (container , http_client )
Original file line number Diff line number Diff line change 1+ # Copyright (c) Jupyter Development Team.
2+ # Distributed under the terms of the Modified BSD License.
13import logging
24import secrets
35import time
911LOGGER = logging .getLogger (__name__ )
1012
1113
12- def test_pluto_proxy (
14+ def check_pluto_proxy (
1315 container : TrackedContainer , http_client : requests .Session
1416) -> None :
15- """Pluto proxy starts Pluto correctly"""
1617 host_port = find_free_port ()
1718 token = secrets .token_hex ()
1819 container .run_detached (
You can’t perform that action at this time.
0 commit comments