[ 
https://issues.apache.org/jira/browse/BEAM-13633?focusedWorklogId=724500&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-724500
 ]

ASF GitHub Bot logged work on BEAM-13633:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Feb/22 13:30
            Start Date: 10/Feb/22 13:30
    Worklog Time Spent: 10m 
      Work Description: KhaninArtur commented on a change in pull request 
#16484:
URL: https://github.com/apache/beam/pull/16484#discussion_r803674591



##########
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:
       ```suggestion
     assert os.path.exists("temp\\" + cloud_path)
   ```




-- 
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: 724500)
    Time Spent: 6.5h  (was: 6h 20m)

> 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: 6.5h
>  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)

Reply via email to