AydarZaynutdinov commented on a change in pull request #16891:
URL: https://github.com/apache/beam/pull/16891#discussion_r815696291
##########
File path: playground/backend/internal/code_processing/code_processing_test.go
##########
@@ -61,16 +69,26 @@ func TestMain(m *testing.M) {
func setup() {
// create configs for java
- err := os.MkdirAll("configs", fs.ModePerm)
+ err := os.MkdirAll(configFolder, fs.ModePerm)
if err != nil {
panic(err)
}
- filePath := filepath.Join("configs", pb.Sdk_SDK_JAVA.String()+".json")
+ filePath := filepath.Join(configFolder,
pb.Sdk_SDK_JAVA.String()+jsonExtension)
Review comment:
```suggestion
filePath := filepath.Join(configFolder, fmt.Sprintf("%s%s",
pb.Sdk_SDK_JAVA.String(), jsonExtension))
```
##########
File path: playground/backend/internal/code_processing/code_processing_test.go
##########
@@ -587,12 +630,25 @@ func Test_getRunOrTestCmd(t *testing.T) {
}
}
-func setupBenchmarks(sdk pb.Sdk) {
+func getSdkEnv(sdk pb.Sdk) (*environment.BeamEnvs, error) {
+ setupSDK(sdk)
+ appEnvs, err := environment.GetApplicationEnvsFromOsEnvs()
+ if err != nil {
+ return nil, err
+ }
+ sdkEnv, err := environment.ConfigureBeamEnvs(appEnvs.WorkingDir())
+ if err != nil {
+ return nil, err
+ }
+ return sdkEnv, nil
+}
+
+func setupSDK(sdk pb.Sdk) {
err := os.MkdirAll(configFolder, fs.ModePerm)
if err != nil {
panic(err)
}
- filePath := filepath.Join(configFolder, sdk.String()+".json")
+ filePath := filepath.Join(configFolder, sdk.String()+jsonExtension)
Review comment:
```suggestion
filePath := filepath.Join(configFolder, fmt.Sprintf("%s%s",
pb.Sdk_SDK_JAVA.String(), jsonExtension))
```
--
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]