Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Tests on slice #808

Merged
merged 5 commits into from
Dec 23, 2020
Merged

Tests on slice #808

merged 5 commits into from
Dec 23, 2020

Conversation

henriquemoraeszup
Copy link
Contributor

Description

There were some changes on this PR besides adding testify. Some of the methods from the utils package were used in a single file. Such methods were moved to their respective files. Also to avoid folder nesting, slice_util.go was moved up one folder

How to verify it

Run slice tests and check if they pass

Changelog

Test refactor on slice util

Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
@codecov-io
Copy link

codecov-io commented Dec 19, 2020

Codecov Report

Merging #808 (10a453f) into master (13b1f44) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #808      +/-   ##
==========================================
+ Coverage   82.52%   82.63%   +0.10%     
==========================================
  Files         110      110              
  Lines        3806     3806              
==========================================
+ Hits         3141     3145       +4     
+ Misses        481      479       -2     
+ Partials      184      182       -2     
Impacted Files Coverage Δ
pkg/autocomplete/generator.go 50.00% <ø> (ø)
pkg/cmd/root.go 75.83% <ø> (ø)
pkg/env/setter.go 89.47% <ø> (ø)
pkg/formula/formula.go 75.00% <ø> (ø)
pkg/sliceutil/slice_util.go 100.00% <ø> (ø)
pkg/cmd/delete_formula.go 74.68% <100.00%> (+0.48%) ⬆️
pkg/cmd/formula.go 85.71% <100.00%> (+2.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13b1f44...10a453f. Read the comment docs.

Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
brunasilvazup
brunasilvazup previously approved these changes Dec 22, 2020
Copy link
Contributor

@kaduartur kaduartur left a comment

Choose a reason for hiding this comment

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

Keep the sliceutil/ package inside the slice/ so we don't have "util" packages lost inside pkg/, this is a very common pattern in Golang. An example is the ioutil package.

Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Copy link
Contributor

@kaduartur kaduartur left a comment

Choose a reason for hiding this comment

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

I liked the approach of removing functions that are specific to their respective packages! 🚀

@kaduartur
Copy link
Contributor

/merge qa

@ritchie-bot
Copy link
Contributor

ritchie-bot bot commented Dec 23, 2020

👌 Merged branch hm/tests-on-slice into qa

@kaduartur kaduartur merged commit 57529c3 into ZupIT:master Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests with Testify in Pkg/Slice/SliceUtil
4 participants