Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove old integration testing code #857

Merged
merged 2 commits into from
May 10, 2024
Merged

Conversation

khieta
Copy link
Contributor

@khieta khieta commented May 10, 2024

Description of changes

  • Deleted the cedar-integration-tests/ folder and cedar-policy/integration_testing.rs file.
  • Some small updates to the README, CHANGELOG, and Cargo.toml to reflect the new change.

Issue #, if available

Resolves #820

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A breaking change requiring a major version bump to cedar-policy (e.g., changes to the signature of an existing API).

I confirm that this PR (choose one, and delete the other options):

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

@khieta khieta added 4.0 breaking-change This is (likely) a breaking change labels May 10, 2024
@khieta
Copy link
Contributor Author

khieta commented May 10, 2024

Looks like the size of the commit will make reviewing difficult. Here's the actual important part of the diff:

  • README.md
 * [cedar-policy-core](./cedar-policy-core) : Internal crate containing the Cedar parser and evaluator
 * [cedar-policy-validator](./cedar-policy-validator) : Internal crate containing the Cedar validator
 * [cedar-policy-formatter](./cedar-policy-formatter) : Internal crate containing an auto-formatter for Cedar policies
-* [cedar-integration-tests](./cedar-integration-tests) : Crate containing integration tests
+* [cedar-testing](./cedar-testing) : Internal crate containing integration testing code
  • cedar-policy/CHANGELOG.md
 - Overhauled the FFI interface in the `frontend` module, and renamed it to
   `ffi`; see #757. (#760, #793, #794, #800, #824, more coming)
 - Much richer error information in the FFI interface (#800)
-- Deprecated the integration testing harness code. It will be removed from the
-  `cedar-policy` crate in the next major version.
 - Removed unnecessary lifetimes from some validation related structs (#715)
 - Made `is_authorized` and `validate` functions in the frontend public, as well as their related structs: `AuthorizationAnswer`, `AuthorizationCall`, `Vali
dationCall`, `ValidationSettings`, `ValidationEnabled`, `ValidationError`, `ValidationWarning`, `ValidationAnswer`. (#737)
 - Changed policy validation to reject comparisons and conditionals between
   record types that differ in whether an attribute is required or optional.
 
+### Removed
+
+- Removed integration testing harness from the `cedar-policy` crate. It is now
+  in an internal crate, allowing us to make semver incompatible changes. (#857)
+
 ## [3.2.0] - Coming Soon
 
 ### Added
@@ -51,6 +54,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   report the precise source location where the unknown type was encountered.
   Error for invalid use of an action now includes a source location containing
   the offending policy. (#802, #808, resolving #522)
+- Deprecated the integration testing harness code. It will be removed from the
+  `cedar-policy` crate in the next major version. (#707)
  • cedar-policy/Cargo.toml
 heap-profiling = ["dep:dhat"]
 corpus-timing = []
 
-integration_testing = []
-
 # Experimental features.
 # Enable all experimental features with `cargo build --features "experimental"`
 experimental = ["partial-eval", "permissive-validate", "partial-validate"]
@@ -58,17 +56,6 @@ wasm = ["serde-wasm-bindgen", "tsify", "wasm-bindgen"]
 crate_type = ["rlib", "cdylib"]
 
 [dev-dependencies]
-# Hack to enable the `integration_testing` feature for the `Cedar` integration
-# tests without enabling it by default for ordinary consumers of `Cedar`. The
-# `default-features = false` stops this dependency from forcibly enabling the
-# default features of `Cedar`, leaving the default features to be controlled by
-# the ordinary `--no-default-features` flag of `cargo test`. See
-# https://github.com/rust-lang/cargo/issues/2911#issuecomment-1483256987 for
-# more information. That issue also tracks a real solution to the problem that
-# could replace this hack.
-cedar-policy = { path = ".", default-features = false, features = [
-    "integration_testing",
-] }
 cool_asserts = "2.0"
 criterion = "0.5"
 globset = "0.4"
  • cedar-policy/src/lib.rs
mod prop_test_policy_set;
 mod tests;
-
-#[cfg(feature = "integration_testing")]
-#[deprecated(since = "3.2.0", note = "please use the `cedar-testing` crate instead")]
-pub mod integration_testing;

@khieta
Copy link
Contributor Author

khieta commented May 10, 2024

CI SemVer failure is expected. Downstream DRT failures are because we're (unnecessarily) depending on the integration_testing flag downstream. This should be an easy fix.

@khieta khieta merged commit fd33ae6 into main May 10, 2024
16 of 17 checks passed
@khieta khieta deleted the khieta/delete-old-int-tests branch May 10, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 breaking-change This is (likely) a breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Delete the cedar-integration-tests folder
3 participants