GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — APIGW: expand coverage for API Keys and Usage Plans by ArthurAkh · Pull Request #13201 · localstack/localstack

This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Conversation

@ArthurAkh

@ArthurAkh ArthurAkh commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

Motivation

We expand coverage for API Keys and Usage Plans.

Changes

  • Add tests for:
    • get_api_keys / get_usage_plan_keys nameQuery (prefix/postfix/infix, case-insensitive) and pagination (limit + position)
    • API Key edge cases (name/value/description lengths, patch validation for immutable fields and enabled type)
    • E2E: create API Key → create Usage Plan → link via UsagePlanKey → list & query keys
  • Snapshot updates

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ArthurAkh ArthurAkh added this to the 4.9 milestone Sep 26, 2025
@ArthurAkh ArthurAkh self-assigned this Sep 26, 2025
@ArthurAkh ArthurAkh added semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes labels Sep 26, 2025
@github-actions

github-actions Bot commented Sep 26, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   17m 50s ⏱️ - 1h 43m 38s
1 170 tests  - 3 701  1 102 ✅  - 3 414  68 💤  - 287  0 ❌ ±0 
1 172 runs   - 3 701  1 102 ✅  - 3 414  70 💤  - 287  0 ❌ ±0 

Results for commit f5684ac. ± Comparison against base commit 1913637.

This pull request removes 3708 and adds 7 tests. Note that renamed tests count towards both.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…
tests.aws.services.apigateway.test_apigateway_extended.TestApigatewayApiKeysCrud ‑ test_create_api_key_with_invalid_name
tests.aws.services.apigateway.test_apigateway_extended.TestApigatewayApiKeysCrud ‑ test_create_api_key_with_invalid_value
tests.aws.services.apigateway.test_apigateway_extended.TestApigatewayApiKeysCrud ‑ test_create_usage_plan_with_throttle
tests.aws.services.apigateway.test_apigateway_extended.TestApigatewayApiKeysCrud ‑ test_negative_get_usage_plan_api_keys
tests.aws.services.apigateway.test_apigateway_extended.TestApigatewayApiKeysCrud ‑ test_update_api_key_immutable_field
tests.aws.services.apigateway.test_apigateway_extended.TestApigatewayApiKeysCrud ‑ test_update_api_key_invalid_description_length
tests.aws.services.apigateway.test_apigateway_extended.TestApigatewayApiKeysCrud ‑ test_update_api_key_invalid_enabled_type

♻️ This comment has been updated with latest results.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Sep 26, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Test Results - Preflight, Unit

22 337 tests  ±0   20 587 ✅ ±0   15m 54s ⏱️ +22s
     1 suites ±0    1 750 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit f5684ac. ± Comparison against base commit 1913637.

♻️ This comment has been updated with latest results.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Sep 26, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 23s ⏱️ -2s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit f5684ac. ± Comparison against base commit 1913637.

♻️ This comment has been updated with latest results.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ArthurAkh ArthurAkh added the notes: skip Pull request does not have to be mentioned in the release notes label Sep 26, 2025
@github-actions

github-actions Bot commented Sep 26, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   34m 19s ⏱️
1 194 tests 1 127 ✅ 67 💤 0 ❌
1 200 runs  1 127 ✅ 73 💤 0 ❌

Results for commit f5684ac.

♻️ This comment has been updated with latest results.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bentsku
bentsku reviewed Sep 29, 2025
View reviewed changes

@bentsku bentsku left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Great added validation 🚀

Just 2 comments: one test name looks like it should fail, so maybe this should be updated. The other one is the PR description mentioning pagination, I think we could remove it from the scope of this PR 👍

Once this is addressed, we're good to merge! 👌

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/aws/services/apigateway/test_apigateway_extended.py

create_api_key_2 = apigw_create_api_key(name=api_key_name_2)
snapshot.match("create-api-key-2", create_api_key)
snapshot.match("create-api-key-2", create_api_key_2)

@bentsku bentsku Sep 29, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch 🚀

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cloutierMat reacted with eyes emoji
All reactions
  • 👀 1 reaction
Comment thread tests/aws/services/apigateway/test_apigateway_extended.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread localstack-core/localstack/services/apigateway/legacy/provider.py
Comment on lines +2405 to +2407
if limit is not None:
if limit < 1 or limit > 500:
limit = None

@bentsku bentsku Sep 29, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think the PR description mentions pagination, but there are no tests for it, so I'd suggest to just drop this new code and merge it like that, the newly added validation is already really good 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bentsku bentsku Oct 16, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was actually a test for the -1 value 👍 added it back

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@alexrashed alexrashed modified the milestones: 4.9, 4.10 Sep 30, 2025
ArthurAkh and others added 2 commits October 16, 2025 16:48
@ArthurAkh @bentsku
add/extend API Keys & Usage Plan tests; stabilize snapshots; minor pr…
a9738bf
…ovider fixes
@bentsku
address PR comments
0b56bda
@bentsku
bentsku force-pushed the apigw-api-key-and-usage-plan-tests branch from a665549 to 0b56bda Compare October 16, 2025 14:53
@bentsku
revert change to limit
f5684ac
@bentsku
bentsku marked this pull request as ready for review October 16, 2025 16:09
@bentsku
bentsku requested a review from cloutierMat as a code owner October 16, 2025 16:09
bentsku
bentsku approved these changes Oct 16, 2025
View reviewed changes

@bentsku bentsku left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I've resolved my comments, renamed the test only and this is now good to merge 👍
I'll run a Pro pipeline just to be sure because we are un-validated tests there, but should be safe

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cloutierMat
cloutierMat approved these changes Oct 16, 2025
View reviewed changes

@cloutierMat cloutierMat left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🚀

Thanks for the extra validation and added tests! 💪

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bentsku reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bentsku
bentsku merged commit aa2a278 into main Oct 17, 2025
@bentsku
bentsku deleted the apigw-api-key-and-usage-plan-tests branch October 17, 2025 00:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@bentsku bentsku bentsku approved these changes
@cloutierMat cloutierMat cloutierMat approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ArthurAkh ArthurAkh

Labels

docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Milestone

4.10

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@ArthurAkh @bentsku @cloutierMat @alexrashed
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.