Merge pull request #2608 from aksagrimada/ssm_pagination

Add Pagination to ssm:get_parameters_by_path. Closes #1864
This commit is contained in:
Mike Grima 2019-12-12 18:22:33 -08:00 committed by GitHub
commit 61f28c308d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 6 deletions

View file

@ -158,6 +158,20 @@ def test_get_parameters_by_path():
len(response["Parameters"]).should.equal(1)
{p["Name"] for p in response["Parameters"]}.should.equal(set(["/baz/pwd"]))
response = client.get_parameters_by_path(Path="/", Recursive=True, MaxResults=4)
len(response["Parameters"]).should.equal(4)
response["NextToken"].should.equal("4")
response = client.get_parameters_by_path(
Path="/", Recursive=True, MaxResults=4, NextToken=response["NextToken"]
)
len(response["Parameters"]).should.equal(4)
response["NextToken"].should.equal("8")
response = client.get_parameters_by_path(
Path="/", Recursive=True, MaxResults=4, NextToken=response["NextToken"]
)
len(response["Parameters"]).should.equal(1)
response.should_not.have.key("NextToken")
@mock_ssm
def test_put_parameter():