You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/04/07 02:30:57 UTC

[GitHub] [incubator-apisix] moonming commented on a change in pull request #1407: bugfix: throw error meg when call admin API to enable mqtt plugin but `stream_proxy` is disabled.

moonming commented on a change in pull request #1407: bugfix: throw error meg when call admin API to enable mqtt plugin but `stream_proxy` is disabled.
URL: https://github.com/apache/incubator-apisix/pull/1407#discussion_r404498896
 
 

 ##########
 File path: t/admin/stream-routes.t
 ##########
 @@ -15,13 +15,42 @@
 # limitations under the License.
 #
 use t::APISIX 'no_plan';
+use Cwd qw(cwd);
 
 repeat_each(1);
 no_long_string();
 no_root_location();
 no_shuffle();
 log_level("info");
 
+my $apisix_home = $ENV{APISIX_HOME} || cwd();
+
+sub read_file($) {
+    my $infile = shift;
+    open my $in, "$apisix_home/$infile"
+        or die "cannot open $infile for reading: $!";
+    my $data = do { local $/; <$in> };
+    close $in;
+    $data;
+}
+
+my $yaml_config = read_file("conf/config.yaml");
+$yaml_config =~ s/node_listen: 9080/node_listen: 1984/;
+$yaml_config =~ s/enable_heartbeat: true/enable_heartbeat: false/;
+$yaml_config =~ s/  # stream_proxy:/  stream_proxy:\n    tcp:\n      - 9100/;
+$yaml_config =~ s/admin_key:/admin_key_useless:/;
 
 Review comment:
   what is `admin_key_useless`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services