Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(plugins/zipkin) make host and port of Zipkin configurable #8626

Merged
merged 7 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/03-plugins/34-zipkin/zipkin_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ local to_hex = require "resty.string".to_hex

local fmt = string.format

local ZIPKIN_HOST = os.getenv("ZIPKIN_HOST") or "127.0.0.1"
local ZIPKIN_PORT = 9411
local ZIPKIN_HOST = helpers.zipkin_host
local ZIPKIN_PORT = helpers.zipkin_port
local GRPCBIN_HOST = "127.0.0.1"
local GRPCBIN_PORT = 15002

Expand Down
5 changes: 5 additions & 0 deletions spec/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ local MOCK_UPSTREAM_SSL_PORT = 15556
local MOCK_UPSTREAM_STREAM_PORT = 15557
local MOCK_UPSTREAM_STREAM_SSL_PORT = 15558
local MOCK_GRPC_UPSTREAM_PROTO_PATH = "./spec/fixtures/grpc/hello.proto"
local ZIPKIN_HOST = os.getenv("KONG_SPEC_TEST_ZIPKIN_HOST") or "localhost"
local ZIPKIN_PORT = tonumber(os.getenv("KONG_SPEC_TEST_ZIPKIN_PORT")) or 9411
local REDIS_HOST = os.getenv("KONG_SPEC_TEST_REDIS_HOST") or "localhost"
local REDIS_PORT = tonumber(os.getenv("KONG_SPEC_TEST_REDIS_PORT") or 6379)
local REDIS_SSL_PORT = tonumber(os.getenv("KONG_SPEC_TEST_REDIS_SSL_PORT") or 6380)
Expand Down Expand Up @@ -2839,6 +2841,9 @@ end
mock_upstream_stream_ssl_port = MOCK_UPSTREAM_STREAM_SSL_PORT,
mock_grpc_upstream_proto_path = MOCK_GRPC_UPSTREAM_PROTO_PATH,

zipkin_host = ZIPKIN_HOST,
zipkin_port = ZIPKIN_PORT,

redis_host = REDIS_HOST,
redis_port = REDIS_PORT,
redis_ssl_port = REDIS_SSL_PORT,
Expand Down