File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
robot/src/test/robotframework/acceptance Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,20 @@ def run_get_all_sessions():
225225 statsStub = openoffload_pb2_grpc .SessionStatisticsTableStub (statsChannel )
226226 print ("-------------- Get All Sessions --------------" )
227227 session_getAllSessions (statsStub )
228+
229+ def run_activation_sequence ():
230+ with open ('ssl/server.crt' , 'rb' ) as f :
231+ creds = grpc .ssl_channel_credentials (f .read ())
232+ activationChannel = grpc .secure_channel ('localhost:3445' ,creds )
233+ activationStub = openoffload_pb2_grpc .ActivationStub (activationChannel )
234+ print ("\n \n ------------Creating new devices---------------------\n " )
235+ activation_registerDevice (activationStub )
236+ print ("\n ------------- Listing available Devices --------------------\n " )
237+ activation_getAllDevices (activationStub )
238+ print ("\n ------------- Activating Device --------------------\n " )
239+ activation_activateDevice (activationStub )
240+ print ("\n ------------- Activation Tests Complete --------------------\n " )
241+
228242def run ():
229243 # NOTE(gRPC Python Team): openoffload_pb2.close() is possible on a channel and should be
230244 # used in circumstances in which the with statement does not fit the needs
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ Get Closed Sessions Test
2424 Run Get Closed Sessions
2525Get All Closed Sessions Test
2626 Run Get All Sessions
27+ Activation Tests
28+ Run Activation Sequence
2729Suite Teardown
2830 Stop Activation Server
2931 Stop Stats Server
Original file line number Diff line number Diff line change @@ -98,6 +98,16 @@ Run Get All Sessions
9898 Should Contain ${result.stdout } SessionId: 1002
9999 Should Contain ${result.stdout } CLOSED
100100
101+ Run Activation Sequence
102+ [Documentation] Run Activation Sequence
103+ Run Process python -c import sessions_client; sessions_client.run_activation_sequence(); cwd=${projectRoot } /../buildBasic alias=client
104+ ${result } = Get Process Result client
105+ Log ${result.stderr }
106+ Log ${result.stdout }
107+ Should Contain ${result.stdout } Status: _DEVICE_REGISTERED
108+ Should Contain ${result.stdout } Description: Acme SmartNIC
109+ Should Contain ${result.stdout } Status: _DEVICE_ACTIVATED
110+
101111Stop Offload Server
102112 [Documentation] Stop Offload Server
103113 Terminate Process offload
You can’t perform that action at this time.
0 commit comments