Skip to content

Add comprehensive in-language tests for all storage types#7626

Open
ironcev wants to merge 1 commit into
masterfrom
ironcev/dynamic-storage-add-tests-for-all-storage-types
Open

Add comprehensive in-language tests for all storage types#7626
ironcev wants to merge 1 commit into
masterfrom
ironcev/dynamic-storage-add-tests-for-all-storage-types

Conversation

@ironcev
Copy link
Copy Markdown
Member

@ironcev ironcev commented May 18, 2026

Description

This PR adds in-language tests for all all storage types, except for StorageKey and StorageVec, which are added in #7614.

Existing SDK harness tests that were testing the same functionality are deleted. This is aligned with the decision to migrate SDK harness tests to in-language tests and and at the same time strengthen the test coverage.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@ironcev ironcev self-assigned this May 18, 2026
@cursor
Copy link
Copy Markdown

cursor Bot commented May 18, 2026

PR Summary

Medium Risk
Moderate risk because it replaces large SDK-harness coverage with new in-language tests; failures could reduce CI signal if the new tests don’t fully match prior edge cases across dynamic vs legacy storage modes.

Overview
Adds new in-language contract test programs for StorageBytes, StorageString, and StorageMap, exercising write_slice/read_slice, len, overwrites, and clear vs clear_existed behavior under both experimental_dynamic_storage modes (including slot-boundary-sized inputs).

Reworks test_types to implement Hash for several custom enums/structs (and RawPtrNewtype) so they can be used as StorageMap keys/values in the new generic test matrix, and renames the new test projects accordingly.

Removes the corresponding SDK harness projects and Rust integration tests (storage_bytes, storage_map, storage_string) from the harness workspace/modules and lockfile, shifting coverage to forc test-driven in-language tests.

Reviewed by Cursor Bugbot for commit 19e8fbb. Bugbot is set up for automated code reviews on this repo. Configure here.

@ironcev ironcev temporarily deployed to fuel-sway-bot May 18, 2026 08:09 — with GitHub Actions Inactive
@ironcev ironcev added the testing General testing label May 18, 2026
@ironcev
Copy link
Copy Markdown
Member Author

ironcev commented May 18, 2026

👍

@ironcev ironcev marked this pull request as ready for review May 18, 2026 09:01
@ironcev ironcev requested a review from a team as a code owner May 18, 2026 09:01
@ironcev ironcev enabled auto-merge (squash) May 18, 2026 09:01
@ironcev ironcev requested review from Dentosal and xunilrj May 18, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing General testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant