Skip to content

chore: tests for app cmd#8918

Merged
crenshaw-dev merged 10 commits intoargoproj:masterfrom
pasha-codefresh:app-tests
Mar 29, 2022
Merged

chore: tests for app cmd#8918
crenshaw-dev merged 10 commits intoargoproj:masterfrom
pasha-codefresh:app-tests

Conversation

@pasha-codefresh
Copy link
Copy Markdown
Member

  1. appURLDefault
  2. truncateString
  3. getServer
  4. targetObjects
  5. printApplicationNames

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2022

Codecov Report

Merging #8918 (4558c0d) into master (5b44356) will increase coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #8918      +/-   ##
==========================================
+ Coverage   43.30%   43.40%   +0.09%     
==========================================
  Files         186      186              
  Lines       23359    23373      +14     
==========================================
+ Hits        10116    10145      +29     
+ Misses      11797    11779      -18     
- Partials     1446     1449       +3     
Impacted Files Coverage Δ
pkg/apis/application/v1alpha1/types.go 54.63% <0.00%> (-0.17%) ⬇️
cmd/argocd/commands/cluster.go 5.66% <0.00%> (-0.03%) ⬇️
cmd/argocd/commands/app.go 9.17% <0.00%> (+1.26%) ⬆️
server/cluster/cluster.go 29.95% <0.00%> (+3.25%) ⬆️

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 5b44356...4558c0d. Read the comment docs.

Copy link
Copy Markdown
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

LGTM!

@crenshaw-dev crenshaw-dev merged commit 0e92705 into argoproj:master Mar 29, 2022
Comment on lines +557 to +559
if result != expectation {
t.Fatalf("Incorrect url %q, should be %q", result, expectation)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
if result != expectation {
t.Fatalf("Incorrect url %q, should be %q", result, expectation)
}
assert.Equal(t, expectation, result, "Incorrect url %q, should be %q", result, expectation)

nit: should we follow the convention of assert ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry! I didn't see the PR is merged

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No worries, it's a good point! We could probably use a cleanup PR to switch over to assert.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i will fix it, im going to push more tests, thank you @crenshaw-dev @chetan-rns

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@chetan-rns i think i wrote like this because all assertions in this file with if conditions, but definitely I will work to fix it in all the places

wojtekidd pushed a commit to wojtekidd/argo-cd that referenced this pull request Apr 25, 2022
* add to approvers

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* application tests

Signed-off-by: pashavictorovich <pavel@codefresh.io>

* application tests

Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: wojtekidd <wojtek.cichon@protonmail.com>
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