Smoketests for default values - #5618
Conversation
…in/bfops/test-suite-fixes' into bfops/consolidate-default-tests
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
…fault-tests' of github.com:clockworklabs/SpacetimeDB into bfops/consolidate-default-tests
| // TODO: uncomment this once negative defaults are fixed in Rust | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5622 | ||
| //("i8_value", "-8"), | ||
| ("u16_value", "16"), | ||
| // TODO: uncomment this once negative defaults are fixed in Rust | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5622 | ||
| //("i16_value", "-16"), | ||
| ("u32_value", "32"), | ||
| // TODO: uncomment this once negative defaults are fixed in Rust | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5622 | ||
| //("i32_value", "-32"), | ||
|
|
||
| // TODO: uncomment once u64s are fixed. | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5623 | ||
| //("u64_value", "64"), | ||
|
|
||
| // TODO: uncomment this once negative defaults are fixed in Rust | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5622 | ||
| //("i64_value", "-64"), | ||
|
|
||
| // TODO: uncomment once floats are fixed in C# and f32s are fixed in Rust | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5624 | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5627 | ||
| //("f32_positive_value", "32.5"), | ||
|
|
||
| // TODO: uncomment once floats are fixed in C#, f32s are fixed in Rust, and negative defaults are fixed in Rust | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5624 | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5627 | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5622 | ||
| //("f32_negative_value", "-32.5"), | ||
| ("f64_positive_value", "64.25"), | ||
| // TODO: uncomment once negative defaults are fixed in Rust | ||
| // https://github.com/clockworklabs/SpacetimeDB/issues/5622 | ||
| //("f64_negative_value", "-64.25"), | ||
|
|
||
| // TODO: uncomment this once string default values are fixed in Rust | ||
| //("string_value", r#""default string""#), |
There was a problem hiding this comment.
For any of these commented-out cases that you don't intend to fix before merging this PR, please update the issue to mention that the test should be uncommented when completed.
| random_string, require_dotnet, require_emscripten, require_pnpm, ModuleLanguage, Smoketest, | ||
| }; | ||
|
|
||
| const EXPECTED_DEFAULTS: &[(&str, &str)] = &[ |
There was a problem hiding this comment.
If support varies by language, can we have multiple different EXPECTED_DEFAULTS for the different languages? It seems silly to not test string defaults in C# or TypeScript just because we don't currently support them in Rust.
There was a problem hiding this comment.
I agree, although I'd quibble about implementation. I would prefer to configure each case to have a list of skipped languages, so it is harder to accidentally quietly elide a case from a language's list entirely.
But given that we have small open PRs that address all the issues, I'm kind of inclined to leave this as-is since they will unify pretty imminently. Does that seem reasonable to you?
Description of Changes
Motivated by #5562, this PR adds smoketests for default column values in all suported languages.
This uncovered multiple bugs:
Follow-up PR #5630 fixes three of those bugs.
API and ABI breaking changes
None. New tests only.
Expected complexity level and risk
2
Testing