Skip to content

Commit d6be341

Browse files
committed
Pass token from test
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
1 parent 143036e commit d6be341

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

kedro-docker/features/docker.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,23 @@ Feature: Docker commands in new projects
5151

5252
Scenario: Execute docker jupyter notebook target
5353
Given I have executed the kedro command "docker build"
54-
When I execute the kedro command "docker jupyter notebook"
55-
Then Jupyter Server should run on port 8888
54+
When I execute the kedro command "docker jupyter notebook --IdentityProvider.token=test-token-abc123"
55+
Then Jupyter Server should run on port 8888 given token test-token-abc123
5656

5757
Scenario: Execute docker jupyter notebook target on custom port
5858
Given I have executed the kedro command "docker build"
59-
When I execute the kedro command "docker jupyter notebook --port 8899"
60-
Then Jupyter Server should run on port 8899
59+
When I execute the kedro command "docker jupyter notebook --IdentityProvider.token=test-token-abc123 --port 8899"
60+
Then Jupyter Server should run on port 8899 given token test-token-abc123
6161

6262
Scenario: Execute docker jupyter lab target
6363
Given I have executed the kedro command "docker build"
6464
When I execute the kedro command "docker jupyter lab --IdentityProvider.token=test-token-abc123"
65-
Then Jupyter Server should run on port 8888
65+
Then Jupyter Server should run on port 8888 given token test-token-abc123
6666

6767
Scenario: Execute docker jupyter lab target on custom port
6868
Given I have executed the kedro command "docker build"
6969
When I execute the kedro command "docker jupyter lab --IdentityProvider.token=test-token-abc123 --port 8899"
70-
Then Jupyter Server should run on port 8899
70+
Then Jupyter Server should run on port 8899 given token test-token-abc123
7171

7272
Scenario: Jupyter port already used
7373
Given I have executed the kedro command "docker build"

kedro-docker/features/steps/cli_steps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,9 @@ def check_docker_ipython_msg(context, msg):
327327
)
328328

329329

330-
@then("Jupyter {command} should run on port {port}")
330+
@then("Jupyter {command} should run on port {port} given token {token}")
331331
def check_jupyter_nb_proc_on_port(
332-
context: behave.runner.Context, command: str, port: int
332+
context: behave.runner.Context, command: str, port: int, token: str
333333
):
334334
"""
335335
Check that jupyter notebook service is running on specified port
@@ -339,7 +339,7 @@ def check_jupyter_nb_proc_on_port(
339339
command: Jupyter command message to check
340340
port: Port to check
341341
"""
342-
url = f"http://localhost:{int(port)}/api?token=test-token-abc123"
342+
url = f"http://localhost:{int(port)}/api?token={token}"
343343
wait_for(
344344
func=_check_service_up,
345345
expected_result=None,

0 commit comments

Comments
 (0)