@@ -0,0 +1,2964 @@
+# syft absolute%0Aimport syft as sy%0Afrom syft.core.io.address import Address%0Afrom syft.grid.messages.setup_messages import CreateInitialSetUpMessage%0Afrom syft.grid.messages.setup_messages import CreateInitialSetUpResponse%0Afrom syft.grid.messages.setup_messages import GetSetUpMessage%0Afrom syft.grid.messages.setup_messages import GetSetUpResponse%0A%0A%0Adef test_create_initial_setup_message_serde() -%3E None:%0A    bob_vm = sy.VirtualMachine(name=%22Bob%22)%0A    target = Address(name=%22Alice%22)%0A%0A    request_content = %7B %0A            %22settings%22: %7B %0A                %22cloud-admin-token%22 : %22d84we35ad3a1d59a84sd9%22,%0A                %22cloud-credentials%22: %22%3Ccloud-credentials.pem%3E%22,%0A                %22infra%22: %7B%0A                    %22autoscaling%22: True,%0A                    %22triggers%22: %7B%0A                        %22memory%22: %2250%22,%0A                        %22vCPU%22: %2280%22%0A                    %7D%0A                %7D,%0A            %7D%0A    %7D%0A    msg = CreateInitialSetUpMessage(%0A        address=target,%0A        content= request_content,%0A        reply_to=bob_vm.address,%0A    )%0A%0A    blob = msg.serialize()%0A    msg2 = sy.deserialize(blob=blob)%0A%0A    assert msg.id == msg2.id%0A    assert msg.address == target%0A    assert msg.content == msg2.content%0A    assert msg == msg2%0A%0Adef test_create_initial_setup_response_serde() -%3E None:%0A    target = Address(name=%22Alice%22)%0A%0A    request_content = %7B%22msg%22: %22Initial setup registered successfully!%22%7D%0A    msg = CreateInitialSetUpResponse(%0A        address=target,%0A        success=True,%0A        content= request_content,%0A    )%0A%0A    blob = msg.serialize()%0A    msg2 = sy.deserialize(blob=blob)%0A%0A    assert msg.id == msg2.id%0A    assert msg.address == target%0A    assert msg.content == msg2.content%0A    assert msg == msg2%0A%0Adef test_get_initial_setup_message_serde() -%3E None:%0A    bob_vm = sy.VirtualMachine(name=%22Bob%22)%0A    target = Address(name=%22Alice%22)%0A%0A    request_content = %7B%7D%0A    msg = GetSetUpMessage(%0A        address=target,%0A        content=request_content,%0A        reply_to=bob_vm.address,%0A    )%0A%0A    blob = msg.serialize()%0A    msg2 = sy.deserialize(blob=blob)%0A%0A    assert msg.id == msg2.id%0A    assert msg.address == target%0A    assert msg.content == msg2.content%0A    assert msg == msg2%0A%0Adef test_delete_worker_response_serde() -%3E None:%0A    target = Address(name=%22Alice%22)%0A%0A    content = %7B %0A            %22settings%22: %7B %0A                %22cloud-admin-token%22 : %22d84we35ad3a1d59a84sd9%22,%0A                %22cloud-credentials%22: %22%3Ccloud-credentials.pem%3E%22,%0A                %22infra%22: %7B%0A                    %22autoscaling%22: True,%0A                    %22triggers%22: %7B%0A                        %22memory%22: %2250%22,%0A                        %22vCPU%22: %2280%22%0A                    %7D%0A                %7D,%0A            %7D%0A    %7D%0A    msg = GetSetUpResponse(%0A        success=True,%0A        address=target,%0A        content=content,%0A    )%0A%0A    blob = msg.serialize()%0A    msg2 = sy.deserialize(blob=blob)%0A%0A    assert msg.id == msg2.id%0A    assert msg.address == target%0A    assert msg.content == msg2.content%0A    assert msg == msg2

ADD PyGrid SetupService message tests