Skip to content

Commit d1a3e4c

Browse files
Update dir location for IDE test
1 parent 00f921d commit d1a3e4c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ publish_testpypi:
5151
dependencies:
5252
- run_tests
5353
script:
54+
- ls dist/
5455
- sed -e "s~__password__~$PyPI_Test_API_token~" .pypirc > $HOME/.pypirc
5556
- pip install -U twine
5657
- python -m twine upload --verbose --repository testpypi dist/*

run_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ ssh -o StrictHostKeyChecking=no sagemaker-ssh-helper.notebook.sagemaker \
118118
python --version
119119

120120
# Run tests
121+
mkdir -p tests/output
121122
cd tests
122123
apt-get install -y firefox-esr
123124
export MOZ_HEADLESS=1

tests/test_ide.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def test_studio_notebook_in_firefox(request, user_profile_name):
326326
options = Options()
327327
options.set_preference("browser.download.folderList", 2)
328328
options.set_preference("browser.download.manager.showWhenStarting", False)
329-
options.set_preference("browser.download.dir", os.path.abspath("../dist/"))
329+
options.set_preference("browser.download.dir", os.path.abspath("../tests/output/"))
330330
firefox = webdriver.Firefox(options)
331331

332332
browser_automation = SageMakerStudioAutomation(ide, firefox)
@@ -349,14 +349,15 @@ def test_studio_notebook_in_firefox(request, user_profile_name):
349349
f"%%sh\n",
350350
f"echo '{local_user_id}' > ~/.sm-ssh-owner"
351351
])
352-
ide_notebook_path = Path("../dist/SageMaker_SSH_IDE-DS2-CPU.ipynb")
352+
ide_notebook_path = Path("../tests/output/SageMaker_SSH_IDE-DS2-CPU.ipynb")
353353
notebook.save_as(ide_notebook_path)
354354

355355
browser_automation.upload_file_with_overwrite(ide_notebook_path)
356356
browser_automation.upload_file_with_overwrite(Path("../dist/", dist_file_name))
357357

358358
# rename to keep original and to compare with the output later
359-
os.rename("../dist/SageMaker_SSH_IDE-DS2-CPU.ipynb", "../dist/SageMaker_SSH_IDE-DS2-CPU-Original.ipynb")
359+
os.rename("../tests/output/SageMaker_SSH_IDE-DS2-CPU.ipynb",
360+
"../tests/output/SageMaker_SSH_IDE-DS2-CPU-Original.ipynb")
360361

361362
browser_automation.open_file_from_path("/SageMaker_SSH_IDE-DS2-CPU.ipynb", 'ml.m5.large')
362363

0 commit comments

Comments
 (0)