Skip to content

Commit

Permalink
tests(cli) add /etc/hosts DB resolving tests for CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
subnetmarco authored and thibaultcha committed Aug 23, 2016
1 parent b184d42 commit a332a2c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/02-integration/01-cmd/02-start_stop_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,24 @@ describe("kong start/stop", function()
end)
end)

describe("/etc/hosts resolving in CLI", function()
-- dnsmasq is not yet started at this point and resty-cli does not include
-- it in its resolver directive. As such and until supported by resty-cli,
-- we must force the use of LuaSocket in our CLI to resolve localhost.
it("resolves cassandra hostname", function()
assert(helpers.kong_exec("start --conf "..helpers.test_conf_path, {
cassandra_contact_points = "localhost",
database = "cassandra"
}))
end)
it("resolves postgres hostname", function()
assert(helpers.kong_exec("start --conf "..helpers.test_conf_path, {
pg_host = "localhost",
database = "postgres"
}))
end)
end)

describe("Serf", function()
it("starts Serf agent daemon", function()
assert(helpers.kong_exec("start --conf "..helpers.test_conf_path))
Expand Down

0 comments on commit a332a2c

Please sign in to comment.