From 8afa7b658c219aeeb079ddc339d727acc30ee5bf Mon Sep 17 00:00:00 2001 From: Michal Cichra Date: Wed, 27 Jun 2018 14:59:03 +0200 Subject: [PATCH] [luacheck] strip trailing whitespace --- .../apicast/policy/rate_limit/redis_shdict.lua | 2 +- spec/configuration_loader/remote_v2_spec.lua | 16 ++++++++-------- spec/configuration_spec.lua | 16 ++++++++-------- spec/luassert_helper.lua | 2 +- spec/policy/rate_limit/redis_shdict_spec.lua | 2 +- spec/spec_helper.lua | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/gateway/src/apicast/policy/rate_limit/redis_shdict.lua b/gateway/src/apicast/policy/rate_limit/redis_shdict.lua index 514ea22cc..dd27a7cf0 100644 --- a/gateway/src/apicast/policy/rate_limit/redis_shdict.lua +++ b/gateway/src/apicast/policy/rate_limit/redis_shdict.lua @@ -86,4 +86,4 @@ function _M:flush_all() redis:flushdb() end -return _M \ No newline at end of file +return _M diff --git a/spec/configuration_loader/remote_v2_spec.lua b/spec/configuration_loader/remote_v2_spec.lua index ff2f185aa..a049c7fb6 100644 --- a/spec/configuration_loader/remote_v2_spec.lua +++ b/spec/configuration_loader/remote_v2_spec.lua @@ -64,7 +64,7 @@ describe('Configuration Remote Loader V2', function() assert.equal(2, #services) assert.same({ { service = { id = 11 } }, { service = { id = 42 } } }, services) end) - + it('returns list of services when APICAST_SERVICES is set', function() env.set('APICAST_SERVICES', '11,42') @@ -87,7 +87,7 @@ describe('Configuration Remote Loader V2', function() assert.equal(1, #services) assert.same({ { service = { id = 1 } } }, services) end) - + it('ignores APICAST_SERVICES when empty', function() env.set('APICAST_SERVICES', '') @@ -100,24 +100,24 @@ describe('Configuration Remote Loader V2', function() assert.equal(1, #services) assert.same({ { service = { id = 1 } } }, services) end) - + it('ignores APICAST_SERVICES when empty and returns a list of services when APICAST_SERVICES_LIST is set', function() env.set('APICAST_SERVICES', '') env.set('APICAST_SERVICES_LIST', '11,42') - + local services = loader:services() - + assert.truthy(services) assert.equal(2, #services) assert.same({ { service = { id = 11 } }, { service = { id = 42 } } }, services) end) - + it('ignores APICAST_SERVICES_LIST when empty and returns a list of services when APICAST_SERVICES is set', function() env.set('APICAST_SERVICES_LIST', '') env.set('APICAST_SERVICES', '11,42') - + local services = loader:services() - + assert.truthy(services) assert.equal(2, #services) assert.same({ { service = { id = 11 } }, { service = { id = 42 } } }, services) diff --git a/spec/configuration_spec.lua b/spec/configuration_spec.lua index 034501a7a..49b62308e 100644 --- a/spec/configuration_spec.lua +++ b/spec/configuration_spec.lua @@ -128,7 +128,7 @@ describe('Configuration object', function() assert.same({ ['42'] = true, ['21'] = true }, services) end) - + it('reads from environment', function() env.set('APICAST_SERVICES_LIST', '42,21') @@ -144,7 +144,7 @@ describe('Configuration object', function() assert.same({}, services) end) - + it('reads from environment', function() env.set('APICAST_SERVICES_LIST', '') @@ -152,22 +152,22 @@ describe('Configuration object', function() assert.same({}, services) end) - + it('reads from environment', function() env.set('APICAST_SERVICES_LIST', '42,21') env.set('APICAST_SERVICES', '') - + local services = services_limit() - + assert.same({ ['42'] = true, ['21'] = true }, services) end) - + it('reads from environment', function() env.set('APICAST_SERVICES', '42,21') env.set('APICAST_SERVICES_LIST', '') - + local services = services_limit() - + assert.same({ ['42'] = true, ['21'] = true }, services) end) end) diff --git a/spec/luassert_helper.lua b/spec/luassert_helper.lua index a3b27e9cf..169773275 100644 --- a/spec/luassert_helper.lua +++ b/spec/luassert_helper.lua @@ -46,4 +46,4 @@ do -- adding assert.returns_error(error_text, ok, ret) : assert.returns_error('n end assert:register("assertion", "returns_error", returns_error, "assertion.error.positive", "assertion.error.negative") -end \ No newline at end of file +end diff --git a/spec/policy/rate_limit/redis_shdict_spec.lua b/spec/policy/rate_limit/redis_shdict_spec.lua index 26025f050..90c56a6fb 100644 --- a/spec/policy/rate_limit/redis_shdict_spec.lua +++ b/spec/policy/rate_limit/redis_shdict_spec.lua @@ -116,4 +116,4 @@ describe('Redis Shared Dictionary', function() assert.near(1, redis:ttl('somekey'), 0.1) end) end) -end) \ No newline at end of file +end) diff --git a/spec/spec_helper.lua b/spec/spec_helper.lua index 1b9b15062..d47adb079 100644 --- a/spec/spec_helper.lua +++ b/spec/spec_helper.lua @@ -53,4 +53,4 @@ end) busted.subscribe({ 'file', 'end' }, function () collectgarbage() -end) \ No newline at end of file +end)