Skip to content

Commit bdb7f7a

Browse files
committed
add EncryptedResource integration tests
1 parent 6189f91 commit bdb7f7a

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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.resource``."""
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_batch_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.resource_cycle_batch_items_check(
31+
some_cmps,
32+
parametrized_actions,
33+
parametrized_item,
34+
ddb_table_name
35+
)
36+
37+
38+
def test_ephemeral_batch_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.resource_cycle_batch_items_check(
41+
aws_kms_cmp,
42+
parametrized_actions,
43+
parametrized_item,
44+
ddb_table_name
45+
)

test/integration/encrypted/test_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from ..integration_test_utils import aws_kms_cmp, ddb_table_name # noqa pylint: disable=unused-import
1717
from ..integration_test_utils import functional_test_utils
1818

19-
pytestmark = [pytest.mark.integration]
19+
pytestmark = pytest.mark.integ
2020

2121

2222
def pytest_generate_tests(metafunc):

0 commit comments

Comments
 (0)