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

Test coverage - assert that equivalent Rust and C# modules produce the same DescribeModule output #1589

Closed
RReverser opened this issue Aug 14, 2024 · 2 comments · Fixed by #1670
Assignees

Comments

@RReverser
Copy link
Contributor

We want to test that C# and Rust modules, when written to expose the same set of tables, types and reducers, spacetime generate the same bindings. Actual codegen goes through the same path, and is checked by the SDK tests, so what's missing is a test that they return the same results from describe_module (or whatever it's called).

Conveniently, we already have interchangeable Rust and C# modules - the SDK test modules are known to be equivalent because we run the same client against both of them without rebuilding its bindings in between.

Write a test which, for each pair of Rust/C# SDK-test modules we happen to have sitting around, calls describe_module on each, deserializes/processes the result as necessary, and then asserts that they're the same.

@RReverser RReverser assigned RReverser and gefjon and unassigned gefjon Aug 14, 2024
@kazimuth
Copy link
Contributor

Deserializing/processing the result can use the new ModuleDef type once that's merged.
We'll need to be a little careful about comparing, since the typespaces can be reordered.

@RReverser
Copy link
Contributor Author

Yeah I already have to normalise them while working on this, because raw Rust and C# outputs already differ.

RReverser added a commit that referenced this issue Nov 28, 2024
Migrated C# ModuleDef to V9 as well as adds tests to ensure that identical modules indeed produce identical schemas.

The two remaining discrepancies between Rust and C# are:
 - #1891
 - Row-level security not having a designed API & implementation for C#.

 - Fixes #1948.
 - Fixes #1589.
 - Supersedes #1619.
RReverser added a commit that referenced this issue Nov 28, 2024
Migrated C# ModuleDef to V9 as well as adds tests to ensure that identical modules indeed produce identical schemas.

The two remaining discrepancies between Rust and C# are:
 - #1891
 - Row-level security not having a designed API & implementation for C#.

 - Fixes #1948.
 - Fixes #1589.
 - Supersedes #1619.
RReverser added a commit that referenced this issue Dec 9, 2024
Migrated C# ModuleDef to V9 as well as adds tests to ensure that identical modules indeed produce identical schemas.

The two remaining discrepancies between Rust and C# are:
 - #1891
 - Row-level security not having a designed API & implementation for C#.

 - Fixes #1948.
 - Fixes #1589.
 - Supersedes #1619.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants