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

fix(action): Add many validations for setvar #747

Merged
merged 7 commits into from
Mar 29, 2023
Merged

fix(action): Add many validations for setvar #747

merged 7 commits into from
Mar 29, 2023

Conversation

jptosso
Copy link
Member

@jptosso jptosso commented Mar 29, 2023

Setvar wasn't doing many validations, and it was returning panics. Now it only allows TX as we don't support any other mutable variable

@jptosso jptosso requested a review from a team as a code owner March 29, 2023 12:48
@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Patch coverage: 68.75% and project coverage change: -0.02 ⚠️

Comparison is base (daf3747) 81.89% compared to head (156fe5f) 81.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##           v3/dev     #747      +/-   ##
==========================================
- Coverage   81.89%   81.87%   -0.02%     
==========================================
  Files         152      152              
  Lines        8345     8359      +14     
==========================================
+ Hits         6834     6844      +10     
- Misses       1290     1292       +2     
- Partials      221      223       +2     
Flag Coverage Δ
default 77.90% <68.75%> (-0.02%) ⬇️
examples 25.44% <0.00%> (-0.05%) ⬇️
ftw 49.74% <31.25%> (-0.04%) ⬇️
ftw-multiphase 49.85% <31.25%> (-0.04%) ⬇️
tinygo 77.06% <68.75%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/actions/setvar.go 60.18% <68.75%> (+1.67%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Co-authored-by: José Carlos Chávez <[email protected]>
Co-authored-by: José Carlos Chávez <[email protected]>
internal/actions/setvar.go Outdated Show resolved Hide resolved
@@ -12,4 +27,22 @@ func TestSetvarInit(t *testing.T) {
t.Error("expected error ErrMissingArguments")
}
})
t.Run("non-map variable", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

@jptosso jptosso merged commit 3b6d122 into v3/dev Mar 29, 2023
@jptosso jptosso deleted the fix-setvar branch March 29, 2023 18:58
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.

4 participants