Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Jun 8, 2024
1 parent 517336f commit 04a088e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions apisix/cli/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
-- limitations under the License.
--

local _M = {}

_M.default_config = {
local _M = {
apisix = {
node_listen = { 9080 },
enable_admin = true,
Expand Down
3 changes: 1 addition & 2 deletions apisix/cli/file.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
local yaml = require("lyaml")
local profile = require("apisix.core.profile")
local util = require("apisix.cli.util")
local cli_config = require("apisix.cli.config")
local default_conf = require("apisix.cli.config")
local dkjson = require("dkjson")

local pairs = pairs
Expand Down Expand Up @@ -229,7 +229,6 @@ function _M.read_yaml_conf(apisix_home)
profile.apisix_home = apisix_home .. "/"
end

local default_conf = cli_config.default_config
local local_conf_path = profile:customized_yaml_path()
if not local_conf_path then
local_conf_path = profile:yaml_path("config")
Expand Down
4 changes: 2 additions & 2 deletions t/APISIX.pm
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ if ($custom_dns_server) {


my $events_module = $ENV{TEST_EVENTS_MODULE} // "lua-resty-events";
my test_default_config = <<_EOC_;
my $test_default_config = <<_EOC_;
-- read the default configuration, modify it, and the Lua package
-- cache will persist it for loading by other entrypoints
-- it is used to replace the test::nginx implementation
local default_config = require("apisix.cli.config")
table.insert(default_config.plugins, "example-plugin")
default_config.plugin_attr.prometheus.enable_export_server = false
default_config.apisix.event.module = "$events_module"
default_config.apisix.events.module = "$events_module"
_EOC_

my $user_yaml_config = read_file("conf/config.yaml");
Expand Down

0 comments on commit 04a088e

Please sign in to comment.