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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

kool deploy destroy + overall API consuming improvements and tests #276

Merged
merged 11 commits into from
Feb 23, 2021

Conversation

fabriciojs
Copy link
Member

Issue -
馃弳 Feature Yes
馃摑 Refactor Yes
鈿狅笍 Break Change No

Description

Introducing new kool deploy destroy command that destroys the current set environment deployed on Kool Cloud.


Notes

  • TBD

@codecov
Copy link

codecov bot commented Feb 18, 2021

Codecov Report

Merging #276 (98732f6) into master (09c6694) will increase coverage by 4.43%.
The diff coverage is 96.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #276      +/-   ##
==========================================
+ Coverage   88.47%   92.90%   +4.43%     
==========================================
  Files          68       70       +2     
  Lines        2689     2736      +47     
==========================================
+ Hits         2379     2542     +163     
+ Misses        286      158     -128     
- Partials       24       36      +12     
Impacted Files Coverage 螖
cmd/deploy_exec.go 87.09% <33.33%> (+47.09%) 猬嗭笍
api/deploy.go 74.24% <100.00%> (+63.94%) 猬嗭笍
api/destroy.go 100.00% <100.00%> (酶)
api/endpoint.go 100.00% <100.00%> (+57.14%) 猬嗭笍
api/errors.go 100.00% <100.00%> (酶)
api/exec.go 100.00% <100.00%> (+100.00%) 猬嗭笍
api/status.go 100.00% <100.00%> (+100.00%) 猬嗭笍
cmd/deploy.go 11.71% <100.00%> (+1.61%) 猬嗭笍
cmd/deploy_destroy.go 100.00% <100.00%> (酶)
... and 7 more

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 09c6694...98732f6. Read the comment docs.

@fabriciojs fabriciojs marked this pull request as ready for review February 20, 2021 05:45
@fabriciojs
Copy link
Member Author

With this, we are caught up with most of the api package testing debt.

}

if err != nil {
if errAPI, is := err.(*ErrAPI); is {
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we use errors.Is(err, ErrApi)?

Copy link
Member Author

Choose a reason for hiding this comment

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

As I understand, errors.Is() checks for value, and not type... since each new pointer of *ErrAPI would have its own possible value, asserting the underlying type behind the interface seems like the way to go.

https://golang.org/pkg/errors/#Is

@danielsuguimoto danielsuguimoto merged commit e8ddbae into master Feb 23, 2021
@danielsuguimoto danielsuguimoto deleted the deploy-destroy branch February 23, 2021 15:11
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.

None yet

2 participants