2222def gw_with_user_env (staging_gateway , logger ):
2323 """
2424 Adds environment variables to the APIcast deployment.
25- A change to log level forces operator reconciliation.
2625 """
2726
2827 test_env_var_name = "APICAST_PATH_ROUTING_ONLY"
@@ -37,19 +36,17 @@ def gw_with_user_env(staging_gateway, logger):
3736 environ .refresh ()
3837 assert environ [test_env_var_name ] == test_env_var_value , "Env var was not set correctly"
3938
40- # Trigger reconciliation by modifying a supported env var that goes through the operator
41- logger .info ("Triggering operator reconciliation..." )
42- staging_gateway .environ ["APICAST_LOG_LEVEL" ] = "debug"
39+ return environ , test_env_var_name , test_env_var_value
4340
44- return staging_gateway , test_env_var_name , test_env_var_value
4541
46-
47- def test_user_env_var_persists (gw_with_user_env , logger ):
42+ def test_user_env_var_persists (gw_with_user_env , staging_gateway ):
4843 """Verify user defined vars remain after reconciliation"""
49- staging_gateway , test_env_var_name , test_env_var_value = gw_with_user_env
44+ environ , test_env_var_name , test_env_var_value = gw_with_user_env
45+
46+ # Trigger reconciliation by modifying a supported env var that goes through the operator
47+ staging_gateway .environ ["APICAST_LOG_LEVEL" ] = "debug"
48+ staging_gateway .deployment .wait_for ()
5049
51- logger .info ("Checking if user-defined env var persists after reconciliation..." )
52- environ = staging_gateway .deployment .environ ()
5350 environ .refresh ()
5451
5552 try :
0 commit comments