@@ -125,7 +125,7 @@ def test_integration_flow(aura_client, test_type):
125125 # Only run this if explicitly enabled and you understand the implications
126126 if test_type == "create_instance" and os .environ .get ("ENABLE_INSTANCE_CREATION" ) == "true" :
127127 # Create a test instance
128- test_instance_name = f"pytest-integration- { os . urandom ( 4 ).hex () } "
128+ test_instance_name = f"Pro Test Instance { uuid . uuid4 ( ).hex [: 8 ] } "
129129
130130 try :
131131 # Create a small instance for testing
@@ -143,26 +143,40 @@ def test_integration_flow(aura_client, test_type):
143143 assert instance ["name" ] == test_instance_name
144144
145145 # Update the instance name
146- updated_name = f"{ test_instance_name } -updated"
146+ print ("Updating instance name" )
147+ updated_name = f"{ test_instance_name } -U"
147148 updated = aura_client .update_instance (instance_id = instance_id , name = updated_name )
148149 assert updated ["name" ] == updated_name
149150
151+ print ("Getting instance details" )
150152 instance_details = aura_client .get_instance_details ([instance_id ])[0 ]
151153 assert instance_details ["name" ] == updated_name
154+
155+ instance_details = wait_for_instance_status (aura_client , instance_id ,"running" )
156+ assert instance_details ["status" ] == "running"
157+
152158 # Pause the instance
159+ print ("Pausing instance" )
153160 paused = aura_client .pause_instance (instance_id )
154161 assert paused ["status" ] in ["paused" , "pausing" ]
155162
163+ print ("Waiting for instance to be paused" )
156164 instance_details = wait_for_instance_status (aura_client , instance_id ,"paused" )
157165 assert instance_details ["status" ] == "paused"
158166
159- # Resume the instance
167+ print ( "Resuming instance" )
160168 resumed = aura_client .resume_instance (instance_id )
161- assert resumed ["status" ] in ["running " , "starting " ]
169+ assert resumed ["status" ] in ["resuming " , "running " ]
162170
171+ print ("Waiting for instance to be running" )
163172 instance_details = wait_for_instance_status (aura_client , instance_id ,"running" )
164173 assert instance_details ["status" ] == "running"
165-
174+
175+ print ("Updating instance memory" )
176+ updated = aura_client .update_instance (instance_id = instance_id , memory = 2 )
177+ instance_details = wait_for_instance_status (aura_client , instance_id ,"running" )
178+ assert instance_details ["memory" ] == "2GB"
179+
166180 except Exception as e :
167181 logger .error (f"Error during instance creation test: { str (e )} " )
168182 raise
0 commit comments