From 42c73b0c0c8f31a7c3f0db1d3c6cdbafc72205d7 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Fri, 2 Sep 2016 14:36:36 +0200 Subject: [PATCH] fixed unit tests after extracting feature/dns2 branch --- kong/tools/dns.lua | 1 - spec/01-unit/02-conf_loader_spec.lua | 2 +- spec/fixtures/invalid.conf | 2 +- spec/fixtures/to-strip.conf | 6 +++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/kong/tools/dns.lua b/kong/tools/dns.lua index b1541b8cf1d8..65510388e89b 100644 --- a/kong/tools/dns.lua +++ b/kong/tools/dns.lua @@ -25,7 +25,6 @@ local setup_client = function(conf) local opts = { hosts = hosts, resolv_conf = nil, - max_resolvers = 50, nameservers = servers, retrans = 5, timeout = 2000, diff --git a/spec/01-unit/02-conf_loader_spec.lua b/spec/01-unit/02-conf_loader_spec.lua index d70834899f6a..4866148a88bb 100644 --- a/spec/01-unit/02-conf_loader_spec.lua +++ b/spec/01-unit/02-conf_loader_spec.lua @@ -95,7 +95,7 @@ describe("Configuration loader", function() end) it("overcomes penlight's list_delim option", function() local conf = assert(conf_loader("spec/fixtures/to-strip.conf")) - assert.False(conf.dnsmasq) + assert.False(conf.pg_ssl) assert.True(conf.plugins.foobar) assert.True(conf.plugins["hello-world"]) end) diff --git a/spec/fixtures/invalid.conf b/spec/fixtures/invalid.conf index 6e1423a79f9f..a209fb352239 100644 --- a/spec/fixtures/invalid.conf +++ b/spec/fixtures/invalid.conf @@ -1,3 +1,3 @@ -dnsmasq = on +pg_ssl = on dns_resolver = 8.8.8.8 cassandra_repl_strategy = foo diff --git a/spec/fixtures/to-strip.conf b/spec/fixtures/to-strip.conf index 0a52586a9744..5853a7d1a6fb 100644 --- a/spec/fixtures/to-strip.conf +++ b/spec/fixtures/to-strip.conf @@ -1,10 +1,14 @@ database = cassandra # strip me log_level = debug # strip this # comment too +pg_ssl = off # Toggles client-server TLS connections + # between Kong and PostgreSQL. + +dns_resolver = 8.8.8.8 custom_plugins = foobar,hello-world # Comma-separated list of additional plugins # this node should load. # Use this property to load custom plugins # that are not bundled with Kong. # Plugins will be loaded from the - # `kong.plugins.{name}.*` namespace. + # `kong.plugins.{name}.*` namespace. \ No newline at end of file