Skip to content

Commit

Permalink
fix(kconfig): remove kong version and edition from kconfig.js (#12045)
Browse files Browse the repository at this point in the history
(cherry picked from commit aed8c05)
  • Loading branch information
raoxiaoyan committed Dec 25, 2023
1 parent e0232d3 commit 73111e7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions kong/admin_gui/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
local meta = require "kong.meta"
local utils = require "kong.admin_gui.utils"

local _M = {}
Expand All @@ -15,8 +14,6 @@ function _M.generate_kconfig(kong_config)
ADMIN_API_URL = utils.prepare_variable(kong_config.admin_gui_api_url),
ADMIN_API_PORT = utils.prepare_variable(api_port),
ADMIN_API_SSL_PORT = utils.prepare_variable(api_ssl_port),
KONG_VERSION = utils.prepare_variable(meta.version),
KONG_EDITION = meta._VERSION:match("enterprise") and "enterprise" or "community",
ANONYMOUS_REPORTS = utils.prepare_variable(kong_config.anonymous_reports),
}

Expand Down
4 changes: 0 additions & 4 deletions spec/01-unit/29-admin_gui/02-admin_gui_template_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ describe("admin_gui template", function()
assert.matches("'ADMIN_API_URL': 'https://admin-reference.kong-cloud.com'", kconfig_content, nil, true)
assert.matches("'ADMIN_API_PORT': '8001'", kconfig_content, nil, true)
assert.matches("'ADMIN_API_SSL_PORT': '8444'", kconfig_content, nil, true)
assert.matches("'KONG_EDITION': 'community'", kconfig_content, nil, true)
end)

it("should regenerates the appropriate kconfig from another call", function()
Expand All @@ -88,7 +87,6 @@ describe("admin_gui template", function()
assert.matches("'ADMIN_API_URL': 'http://localhost:8001'", new_content, nil, true)
assert.matches("'ADMIN_API_PORT': '8001'", new_content, nil, true)
assert.matches("'ADMIN_API_SSL_PORT': '8444'", new_content, nil, true)
assert.matches("'KONG_EDITION': 'community'", new_content, nil, true)
end)
end)

Expand Down Expand Up @@ -151,7 +149,6 @@ describe("admin_gui template", function()
assert.matches("'ADMIN_API_PORT': '8001'", kconfig_content, nil, true)
assert.matches("'ADMIN_API_SSL_PORT': '8444'", kconfig_content, nil, true)
assert.matches("'ANONYMOUS_REPORTS': 'false'", kconfig_content, nil, true)
assert.matches("'KONG_EDITION': 'community'", kconfig_content, nil, true)
end)

it("should regenerates the appropriate kconfig from another call", function()
Expand All @@ -170,7 +167,6 @@ describe("admin_gui template", function()
assert.matches("'ADMIN_API_PORT': '8001'", new_content, nil, true)
assert.matches("'ADMIN_API_SSL_PORT': '8444'", new_content, nil, true)
assert.matches("'ANONYMOUS_REPORTS': 'true'", new_content, nil, true)
assert.matches("'KONG_EDITION': 'community'", new_content, nil, true)
end)
end)

Expand Down
2 changes: 0 additions & 2 deletions spec/02-integration/17-admin_gui/01-admin-gui-path_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ describe("Admin GUI - admin_gui_path", function()
path = "/kconfig.js",
})
res = assert.res_status(200, res)
assert.matches("'KONG_VERSION': '", res)
assert.matches("'ADMIN_GUI_PATH': '/'", res, nil, true)
end)

Expand Down Expand Up @@ -116,7 +115,6 @@ describe("Admin GUI - admin_gui_path", function()
path = "/manager/kconfig.js",
})
res = assert.res_status(200, res)
assert.matches("'KONG_VERSION': '", res)
assert.matches("'ADMIN_GUI_PATH': '/manager'", res, nil, true)
end)
end)

0 comments on commit 73111e7

Please sign in to comment.