You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2022/02/10 00:00:42 UTC

[GitHub] [incubator-teaclave] qinkunbao commented on a change in pull request #620: [Services] add disable function

qinkunbao commented on a change in pull request #620:
URL: https://github.com/apache/incubator-teaclave/pull/620#discussion_r803190537



##########
File path: tests/functional/enclave/src/management_service.rs
##########
@@ -188,6 +188,29 @@ fn test_delete_function() {
     assert!(response.is_ok());
 }
 
+#[test_case]
+fn test_disable_function() {
+    let function_input = FunctionInput::new("input", "input_desc", false);
+    let function_output = FunctionOutput::new("output", "output_desc", false);
+    let request = RegisterFunctionRequestBuilder::new()
+        .name("mock_function")
+        .executor_type(ExecutorType::Python)
+        .payload(b"def entrypoint:\n\treturn".to_vec())
+        .public(true)
+        .arguments(vec!["arg"])
+        .inputs(vec![function_input])
+        .outputs(vec![function_output])
+        .build();
+
+    let mut client = authorized_client("mock_user");
+    let response = client.register_function(request);
+    let function_id = response.unwrap().function_id;
+
+    let request = DisableFunctionRequest::new(function_id);
+    let response = client.disable_function(request);
+    assert!(response.is_ok());

Review comment:
       https://github.com/apache/incubator-teaclave/issues/621
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org