You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2022/12/06 06:49:21 UTC

[GitHub] [incubator-pegasus] GehaFearless commented on a diff in pull request #1272: feat: add rename_app interface

GehaFearless commented on code in PR #1272:
URL: https://github.com/apache/incubator-pegasus/pull/1272#discussion_r1040563847


##########
src/meta/test/meta_app_operation_test.cpp:
##########
@@ -795,5 +809,28 @@ TEST_F(meta_app_operation_test, recover_from_max_replica_count_env)
     verify_app_max_replica_count(APP_NAME, new_max_replica_count);
 }
 
+TEST_F(meta_app_operation_test, rename_app)
+{
+    const std::string app_name_1 = APP_NAME + "_rename_1";
+    create_app(app_name_1);
+    auto app = find_app(app_name_1);
+    auto app_id_1 = app->app_id;
+
+    const std::string app_name_2 = APP_NAME + "_rename_2";
+    create_app(app_name_2);
+    app = find_app(app_name_2);
+    auto app_id_2 = app->app_id;
+
+    const std::string app_name_3 = APP_NAME + "_rename_3";
+
+    auto resp = rename_app(app_name_1, app_name_2);
+    ASSERT_EQ(resp.err, ERR_INVALID_PARAMETERS);
+
+    resp = rename_app(app_name_1, app_name_3);
+    ASSERT_EQ(resp.err, ERR_OK);
+    app = find_app(app_name_3);
+    ASSERT_EQ(app->app_id, app_id_1);

Review Comment:
   thx



-- 
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: dev-unsubscribe@pegasus.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org