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

Reintegrate Community-Driven Test Suites #38

Merged
merged 5 commits into from
Mar 8, 2024

Conversation

RDPerera
Copy link
Member

@RDPerera RDPerera commented Mar 7, 2024

Purpose

This PR aims to reintroduce community-driven test suites into the ballerina/toml. These test suites were previously managed as Git submodules and are critical for ensuring the robustness and reliability of the read APIs provided by these modules.

Related to: ballerina-platform/ballerina-library#6129

Examples

N/A - This PR focuses on test suite integration rather than API usage examples.

Checklist

  • Linked to an issue (#6129)
  • Updated the changelog
  • Added tests
  • Updated the spec (if applicable)
  • Checked native-image compatibility (if applicable)

@RDPerera RDPerera requested a review from shafreenAnfar as a code owner March 7, 2024 05:50
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.64%. Comparing base (7fd3f84) to head (62e28a4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   95.53%   98.64%   +3.10%     
==========================================
  Files          23       23              
  Lines        1031     1031              
  Branches      672      672              
==========================================
+ Hits          985     1017      +32     
+ Misses         46       14      -32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ballerina/build.gradle Outdated Show resolved Hide resolved
@RDPerera RDPerera requested a review from nipunayf March 7, 2024 07:24
Copy link
Contributor

@nipunayf nipunayf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not close the issue with this PR. Better if we can use Related to instead of Fixes since we need to add the fix for the YAML module as well.

ballerina/Dependencies.toml Outdated Show resolved Hide resolved
@RDPerera RDPerera requested a review from nipunayf March 7, 2024 09:15
Copy link
Contributor

@nipunayf nipunayf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current flow only keeps the resource files during the Gradle build. This is fine in a workflow build; however, as a developer, it's better if we can have the test resources cloned at all times. So, can we include the .gitmodules as well, so the developer can clone the modules recursively at the beginning. WDYT?

ballerina/tests/it.bal Outdated Show resolved Hide resolved
ballerina/tests/it.bal Outdated Show resolved Hide resolved
@RDPerera
Copy link
Member Author

RDPerera commented Mar 8, 2024

Changed with 9bda069.

ballerina/build.gradle Outdated Show resolved Hide resolved
Copy link
Contributor

@nipunayf nipunayf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,4 @@
[submodule "ballerina/tests/resources"]
path = ballerina/tests/resources
url = https://github.com/nipunayf/toml-test
Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to use the fork instead of the original repo (https://github.com/toml-lang/toml-test) for the submodule? @nipunayf any idea?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately, this decision is made to have control over the test suite. If there are new test cases that have breaking changes to the supported specification, then the lang library would fail. Ideally, in such cases, we should handle it in a different major version rather than allowing the build to fail. More importantly, some cases were modified or removed intentionally due to a few limitations in the Ballerina language, since the modules were designed to be pure Ballerina.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. That makes sense.

@NipunaRanasinghe NipunaRanasinghe merged commit 3411b3f into ballerina-platform:main Mar 8, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants