Skip to content

Commit 1445f6b

Browse files
committed
updates
Signed-off-by: Kesha Hietala <[email protected]>
1 parent 88ed303 commit 1445f6b

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

cedar-policy/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ method checks the request against the schema provided and the
5959
`RequestBuilder<UnsetSchema>::build` method becomes infallible. (#559)
6060
- Improved "unexpected token" parse errors when the schema or policy parsers
6161
expect an identifier. (#698)
62+
- Deprecated the integration testing harness code. It will be removed from the
63+
`cedar-policy` crate in the next major version.
6264

6365
### Fixed
6466

cedar-testing/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,3 @@
22

33
This package contains utility code for testing `cedar-policy` and `cedar-policy-cli`.
44
It is used for running integration tests in CI and by our fuzzing infrastructure in [`cedar-spec`](https://github.com/cedar-policy/cedar-spec).
5-
6-
## Running integration tests
7-
8-
The integration tests are run by default in CI (e.g., as a part of each pull request), but you can also run them locally.
9-
In order to do this, you need to have the [`cedar-integration-tests`](https://github.com/cedar-policy/cedar-integration-tests) repository cloned in the top-level directory (`..`).
10-
11-
Then, run `cargo test -- integration-tests --ignored`
12-
13-
(You can omit `--ignored` if you want to skip the corpus tests for faster feedback.)

cedar-testing/tests/cedar-policy-cli/corpus_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn corpus_tests() {
5151
.expect("didn't expect subdirectories in corpus_tests")
5252
.to_str()
5353
.expect("expected filenames to be valid UTF-8");
54-
filename.ends_with(".json") && !filename.ends_with(".entities.json")
54+
filename.ends_with(".json") && !filename.starts_with("schema_")
5555
})
5656
// As of this writing, runtime to run all of the corpus tests is
5757
// excessively long.

cedar-testing/tests/cedar-policy-cli/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ mod example_use_cases;
2626
mod ip;
2727
mod multi;
2828

29-
use cedar_testing::integration_testing::JsonTest;
3029
use cedar_policy::Decision;
3130
use cedar_policy::EntityUid;
3231
use cedar_policy::PolicySet;
32+
use cedar_testing::integration_testing::JsonTest;
3333
use std::env;
3434
use std::path::{Path, PathBuf};
3535
use std::str::FromStr;

cedar-testing/tests/cedar-policy/corpus_tests.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@ fn corpus_tests() {
4646
)
4747
})
4848
.map(|e| e.expect("failed to access file in corpus_tests").path())
49-
// only consider files like `*.json`
5049
.filter(|p| {
5150
let filename = p
5251
.file_name()
5352
.expect("didn't expect subdirectories in corpus_tests")
5453
.to_str()
5554
.expect("expected filenames to be valid UTF-8");
56-
filename.ends_with(".json") && !filename.ends_with(".entities.json")
55+
filename.ends_with(".json") && !filename.starts_with("schema_")
5756
});
5857
for test_json in test_jsons {
5958
perform_integration_test_from_json(test_json);

0 commit comments

Comments
 (0)