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

Application links tests #484

Merged
merged 45 commits into from
Jun 21, 2021
Merged

Application links tests #484

merged 45 commits into from
Jun 21, 2021

Conversation

RiccardoM
Copy link
Contributor

Description

This PR introduces tests for the new application links feature.
Works towards #472

Checklist

  • Targeted PR against correct branch.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit tests.
  • Wrote integration tests (simulation & CLI).
  • Updated the documentation.
  • Added an entry to the CHANGELOG.md file.
  • Re-reviewed Files changed in the Github PR explorer.

RiccardoM and others added 13 commits June 10, 2021 19:35
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Co-authored-by: Leonardo Bragagnolo <leo.braga95@gmail.com>
Co-authored-by: Leonardo Bragagnolo <leo.braga95@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
…mos into riccardo/app-links-tests

� Conflicts:
�	x/profiles/types/models_app_links.go
@codecov
Copy link

codecov bot commented Jun 14, 2021

Codecov Report

Merging #484 (0eab15f) into master (2921d21) will decrease coverage by 0.56%.
The diff coverage is 71.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #484      +/-   ##
==========================================
- Coverage   84.21%   83.64%   -0.57%     
==========================================
  Files          87       90       +3     
  Lines        3933     4372     +439     
==========================================
+ Hits         3312     3657     +345     
- Misses        478      556      +78     
- Partials      143      159      +16     
Impacted Files Coverage Δ
x/profiles/keeper/keeper_chain_links.go 90.90% <ø> (ø)
x/profiles/keeper/msg_server_app_link.go 0.00% <0.00%> (ø)
x/profiles/keeper/msgs_server_profile.go 76.74% <ø> (ø)
x/profiles/types/msgs_chain_links.go 86.95% <ø> (ø)
x/profiles/types/query_app_links.go 0.00% <0.00%> (ø)
x/profiles/client/cli/cli_app_links.go 30.76% <30.76%> (ø)
x/profiles/keeper/grpc_query.go 74.32% <71.42%> (-0.68%) ⬇️
x/profiles/keeper/keeper_app_links.go 80.00% <80.00%> (ø)
x/profiles/types/msgs_app_links.go 86.27% <86.27%> (ø)
x/profiles/keeper/relay_app_links.go 95.12% <95.12%> (ø)
... and 17 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 2921d21...0eab15f. Read the comment docs.

RiccardoM and others added 16 commits June 15, 2021 07:09
Co-authored-by: Paul <p22626262@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
…mos into riccardo/app-links-tests

� Conflicts:
�	x/profiles/types/msgs_app_links.go
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
…to riccardo/app-links-tests

� Conflicts:
�	x/profiles/client/cli/cli_app_links.go
�	x/profiles/keeper/keeper_app_links.go
�	x/profiles/keeper/relay_app_links_test.go
�	x/profiles/module_ibc.go
�	x/profiles/types/genesis_test.go
�	x/profiles/types/models_app_links.go
�	x/profiles/types/msgs_app_links.go
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
RiccardoM added 11 commits June 15, 2021 13:03
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
…les directly

Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@RiccardoM RiccardoM requested review from dadamu and leobragaz and removed request for dadamu June 16, 2021 11:04
@RiccardoM RiccardoM marked this pull request as ready for review June 16, 2021 11:04
"github.com/desmos-labs/desmos/x/profiles/client/cli"
"github.com/desmos-labs/desmos/x/profiles/types"
)

Copy link
Contributor

Choose a reason for hiding this comment

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

The GetCmdLinkApplication tests are missing here 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I know, unfortunately this is not an easy method to test. What we would have to do is:

  1. Instantiate a fake Band chain
  2. Create an IBC connection between the Desmos and Band chain
  3. Use that fake connection to send the packet using this command

Since this is very complicated, I think it's better to leave as it is without any test right now. I will take care of opening an issue and explaining what should be done once the PR gets merged

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh ok no problem!

…app-links

� Conflicts:
�	proto/desmos/profiles/v1beta1/genesis.proto
�	x/profiles/client/cli/cli_chain_links.go
�	x/profiles/client/cli/query.go
�	x/profiles/keeper/alias_functions.go
�	x/profiles/keeper/genesis.go
�	x/profiles/keeper/genesis_test.go
�	x/profiles/keeper/keeper.go
�	x/profiles/types/genesis.go
�	x/profiles/types/genesis.pb.go
�	x/profiles/types/genesis_test.go
�	x/profiles/types/keys.go
�	x/profiles/types/query.pb.go
�	x/profiles/types/query.pb.gw.go
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
…to riccardo/app-links-tests

� Conflicts:
�	proto/desmos/profiles/v1beta1/genesis.proto
�	x/profiles/client/cli/query.go
�	x/profiles/keeper/genesis.go
�	x/profiles/keeper/genesis_test.go
�	x/profiles/keeper/grpc_query_test.go
�	x/profiles/keeper/keeper_chain_links_test.go
�	x/profiles/keeper/msg_server_chain_link_test.go
�	x/profiles/types/genesis.go
�	x/profiles/types/genesis.pb.go
�	x/profiles/types/genesis_test.go
�	x/profiles/types/keys.go
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
…app-links-tests

� Conflicts:
�	x/profiles/keeper/querier_test.go
@RiccardoM RiccardoM requested a review from leobragaz June 21, 2021 06:10
@RiccardoM
Copy link
Contributor Author

@bragaz Can I merge this? What do you think?

@leobragaz
Copy link
Contributor

@RiccardoM Yes it's good! Go ahead 👍

@RiccardoM RiccardoM enabled auto-merge (squash) June 21, 2021 06:48
@RiccardoM RiccardoM merged commit 3aba36d into master Jun 21, 2021
@RiccardoM RiccardoM deleted the riccardo/app-links-tests branch June 21, 2021 07:05
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.

2 participants