• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TykTechnologies / tyk / 5512 / 1

Build:
DEFAULT BRANCH: master
Ran 09 Sep 2018 09:34AM UTC
Files 99
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2018 09:28AM UTC coverage: 59.761% (+0.1%) from 59.642%
LATEST_GO=true

push

travis-ci

buger
per API partitions option added (#1883)

Added changes for https://github.com/TykTechnologies/tyk/issues/1783

While looking at this feature I tried to follow ideas:
- legacy should continue working without any tricks
- we should be able to use the same concept of partitioned policies but with one more edge case when we can specify quota and rate limit in more than one partitioned policy if they have different APIs in ACL
- we should be able specify quota and rate limit on API level (ACL item) explicitly when we create policy 

The idea is to introduce new option "Per API" in partitions section when we create policy. If this option is unchecked - everything should work as before.

Also, there is one condition - that new option "Per API" comes to play only when another partition option "Enforce access control" (aka ACL) is checked as this is what tells our logic to merge access rights from different policies into one array in key session when several (partitioned) policies attached to key. Imho it is weird, maybe can be fixed on UI level.

Also, I've introduced quota and rate limit on API level (field `limit`) in `AccessDefinition` because:
- we need to be able to specify quota and rate limit per ACL item when we create policy
- we need to store quota and rate limit per ACL policy even if it was not specified per ACL item but just on policy level - so all ACL items kind of inherit quota and rate from policy and overwrite it if it was specified explicitly while policy was created
- when quota and rate on ACL item level inherited from policy `AccessDefinition.Limit` gets new field `SetByPolicy` to true - for informative/debug purposes so we know from where that limit on API level has come from

If we have limits on API level we add API ID to storage keys (leaky bucket and other rate limits keys or keys to store quota for key or org session).

If we don't have limit specified on API level quota and rate limit should work as they were wor... (continued)

9499 of 15895 relevant lines covered (59.76%)

0.66 hits per line

Source Files on job 5512.1 (LATEST_GO=true)
  • Tree
  • List 0
  • Changed 10
  • Source Changed 6
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5029
  • Travis Job 5512.1
  • 31f70e48 on github
  • Prev Job for LATEST_GO=true on master (#5496.1)
  • Next Job for LATEST_GO=true on master (#5521.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc