@@ -6,7 +6,7 @@ async def test_env_vars_on_sandbox():
66 sandbox = await AsyncSandbox .create (envs = {"TEST_ENV_VAR" : "supertest" })
77 try :
88 result = await sandbox .run_code (
9- "String x = System.getenv( \ " TEST_ENV_VAR\" ); x" ,
9+ ' System.getProperty( "TEST_ENV_VAR")' ,
1010 language = "java"
1111 )
1212 assert result .text is not None
@@ -18,13 +18,13 @@ async def test_env_vars_per_execution():
1818 sandbox = await AsyncSandbox .create ()
1919 try :
2020 result = await sandbox .run_code (
21- " System.getenv( \ " FOO\" )" ,
21+ ' System.getProperty( "FOO")' ,
2222 envs = {"FOO" : "bar" },
2323 language = "java"
2424 )
2525
2626 result_empty = await sandbox .run_code (
27- "String value = System.getenv( \ " FOO\" ); value != null ? value : \ " default\" " ,
27+ ' System.getProperty( "FOO", "default")' ,
2828 language = "java"
2929 )
3030
@@ -40,7 +40,7 @@ async def test_env_vars_overwrite():
4040 sandbox = await AsyncSandbox .create (envs = {"TEST_ENV_VAR" : "supertest" })
4141 try :
4242 result = await sandbox .run_code (
43- "String x = System.getenv( \ " TEST_ENV_VAR\" ); x" ,
43+ ' System.getProperty( "TEST_ENV_VAR")' ,
4444 language = "java" ,
4545 envs = {"TEST_ENV_VAR" : "overwrite" }
4646 )
0 commit comments