Skip to content

Commit

Permalink
fix ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
long2ice committed Nov 9, 2020
1 parent 825ff9f commit d8b1514
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ app = FastAPI()

@app.on_event("startup")
async def startup():
redis = await aioredis.create_redis_pool("redis://redis")
redis = await aioredis.create_redis_pool("redis://localhost")
FastAPILimiter.init(redis)


Expand Down
2 changes: 1 addition & 1 deletion examples/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@app.on_event("startup")
async def startup():
redis = await aioredis.create_redis_pool("redis://redis")
redis = await aioredis.create_redis_pool("redis://localhost")
FastAPILimiter.init(redis)


Expand Down
2 changes: 2 additions & 0 deletions tests/test_depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def test_limiter():
assert response.status_code == 200
assert response.json() == {"msg": "Hello World"}

client.get("/")

response = client.get("/")
assert response.status_code == 403
sleep(5)
Expand Down

0 comments on commit d8b1514

Please sign in to comment.