[
https://issues.apache.org/jira/browse/BEAM-13633?focusedWorklogId=724532&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-724532
]
ASF GitHub Bot logged work on BEAM-13633:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Feb/22 14:10
Start Date: 10/Feb/22 14:10
Worklog Time Spent: 10m
Work Description: ilya-kozyrev commented on a change in pull request
#16484:
URL: https://github.com/apache/beam/pull/16484#discussion_r803712334
##########
File path: playground/infrastructure/test_cd_helper.py
##########
@@ -127,3 +128,19 @@ def test__save_to_cloud_storage(mocker):
CDHelper()._save_to_cloud_storage([example])
write_to_os_mock.assert_called_with(example)
upload_blob_mock.assert_called_with(source_file="", destination_blob_name="")
+
+
+def test__write_default_example_path_to_local_fs(delete_temp_folder):
+ """
+ Test writing default example link of sdk to
+ the filesystem (in temp folder)
+ Args:
+ delete_temp_folder: python fixture to clean up temp folder
+ after method execution
+ """
+ sdk = Sdk.Name(SDK_GO)
+ default_example_path =
"SDK_GO\\PRECOMPILED_OBJECT_TYPE_EXAMPLE\\MinimalWordCount"
+ expected_result = str(pathlib.Path(sdk, Config.DEFAULT_PRECOMPILED_OBJECT))
+ cloud_path =
CDHelper()._write_default_example_path_to_local_fs(default_example_path)
+ assert cloud_path == expected_result
+ assert os.path.exists("temp\\" + cloud_path) is True
Review comment:
and maybe os.path.join instead of concatenation :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 724532)
Time Spent: 6h 40m (was: 6.5h)
> Implement method to get a default example for each SDKs
> -------------------------------------------------------
>
> Key: BEAM-13633
> URL: https://issues.apache.org/jira/browse/BEAM-13633
> Project: Beam
> Issue Type: Sub-task
> Components: beam-playground
> Reporter: Pavel Avilov
> Assignee: Pavel Avilov
> Priority: P2
> Labels: beam-playground-backend, beam-playground-sprint-7
> Time Spent: 6h 40m
> Remaining Estimate: 0h
>
> Need to implement a method that will return a default example for each SDKs.
> Store the description of default examples in the config.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)