Skip to content

Commit dc3da0d

Browse files
committed
add EncryptedClient integration tests
1 parent dfb8be4 commit dc3da0d

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
"""Integration tests for ``dynamodb_encryption_sdk.encrypted.client``."""
14+
import pytest
15+
16+
from ..integration_test_utils import aws_kms_cmp, ddb_table_name # noqa pylint: disable=unused-import
17+
from ..integration_test_utils import functional_test_utils
18+
19+
pytestmark = pytest.mark.integ
20+
21+
22+
def pytest_generate_tests(metafunc):
23+
functional_test_utils.set_parametrized_actions(metafunc)
24+
functional_test_utils.set_parametrized_cmp(metafunc)
25+
functional_test_utils.set_parametrized_item(metafunc)
26+
27+
28+
def test_ephemeral_item_cycle(ddb_table_name, some_cmps, parametrized_actions, parametrized_item):
29+
"""Test a small number of curated CMPs against a small number of curated items."""
30+
functional_test_utils.client_cycle_single_item_check(
31+
some_cmps,
32+
parametrized_actions,
33+
parametrized_item,
34+
ddb_table_name
35+
)
36+
37+
38+
def test_ephemeral_item_cycle_kms(ddb_table_name, aws_kms_cmp, parametrized_actions, parametrized_item):
39+
"""Test the AWS KMS CMP against a small number of curated items."""
40+
functional_test_utils.client_cycle_single_item_check(
41+
aws_kms_cmp,
42+
parametrized_actions,
43+
parametrized_item,
44+
ddb_table_name
45+
)
46+
47+
48+
def test_ephemeral_batch_item_cycle(ddb_table_name, some_cmps, parametrized_actions, parametrized_item):
49+
"""Test a small number of curated CMPs against a small number of curated items."""
50+
functional_test_utils.client_cycle_batch_items_check(
51+
some_cmps,
52+
parametrized_actions,
53+
parametrized_item,
54+
ddb_table_name
55+
)
56+
57+
58+
def test_ephemeral_batch_item_cycle_kms(ddb_table_name, aws_kms_cmp, parametrized_actions, parametrized_item):
59+
"""Test the AWS KMS CMP against a small number of curated items."""
60+
functional_test_utils.client_cycle_batch_items_check(
61+
aws_kms_cmp,
62+
parametrized_actions,
63+
parametrized_item,
64+
ddb_table_name
65+
)

0 commit comments

Comments
 (0)