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

unskipping the TestGhostNodeExample tests #1670

Merged
merged 5 commits into from
Nov 30, 2021

Conversation

vishalchangrani
Copy link
Contributor

No description provided.

@vishalchangrani vishalchangrani self-assigned this Nov 23, 2021
@@ -22,7 +22,6 @@ import (
// TestGhostNodeExample_Subscribe demonstrates how to emulate a node and receive all inbound events for it
func TestGhostNodeExample_Subscribe(t *testing.T) {

t.Skip()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

testing if the unskipping passes CI.

@gomisha gomisha requested a review from synzhu November 23, 2021 18:19
@vishalchangrani
Copy link
Contributor Author

  1. The integration test fails so the test is broken.
  2. The test does two thing - 1. demonstrate how to use a ghost node and 2. Make sure the ghost node works as expected.
    For point 2, I feel the test should be continuously run as a regular test.
    cc: @smnzhu

)

nodes := append([]testnet.NodeConfig{collNode, conNode1, conNode2, conNode3, realExeNode, verNode, ghostExeNode})
nodes := append([]testnet.NodeConfig{collNode, conNode1, conNode2, conNode3, realExeNode, verNode, ghostExeNode, accessNode})
conf := testnet.NewNetworkConfig("ghost_example_subscribe", nodes)

net := testnet.PrepareFlowNetwork(t, conf)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test needs to call testnet.PrepareFlowNetwork(t, conf) to setup all the docker instances. That call need the *testing.T object and that is not available if I convert this test to an ExampleTest :(

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahhh I see :/

Okay, in that case it's okay, can we at least update https://github.com/onflow/flow-go/pull/1670/files#diff-6df27b5bc6af729e3267f2404aa0d5e17319d629fbfffd697f1272474f59cfd2L19-L20 to explain that these tests are actually meaningful tests, and don't solely exist to serve as examples? thanks :)

)

nodes := append([]testnet.NodeConfig{collNode, conNode1, conNode2, conNode3, realExeNode, verNode, ghostExeNode})
nodes := append([]testnet.NodeConfig{collNode, conNode1, conNode2, conNode3, realExeNode, verNode, ghostExeNode, accessNode})
conf := testnet.NewNetworkConfig("ghost_example_subscribe", nodes)

net := testnet.PrepareFlowNetwork(t, conf)
Copy link
Contributor

Choose a reason for hiding this comment

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

Ahhh I see :/

Okay, in that case it's okay, can we at least update https://github.com/onflow/flow-go/pull/1670/files#diff-6df27b5bc6af729e3267f2404aa0d5e17319d629fbfffd697f1272474f59cfd2L19-L20 to explain that these tests are actually meaningful tests, and don't solely exist to serve as examples? thanks :)

@codecov-commenter
Copy link

Codecov Report

Merging #1670 (effcebf) into master (923546c) will increase coverage by 0.03%.
The diff coverage is n/a.

❗ Current head effcebf differs from pull request most recent head 82af66e. Consider uploading reports for the commit 82af66e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1670      +/-   ##
==========================================
+ Coverage   56.30%   56.34%   +0.03%     
==========================================
  Files         554      554              
  Lines       32751    32751              
==========================================
+ Hits        18440    18452      +12     
+ Misses      11860    11847      -13     
- Partials     2451     2452       +1     
Flag Coverage Δ
unittests 56.34% <ø> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
admin/command_runner.go 79.20% <0.00%> (ø)
...sus/approvals/assignment_collector_statemachine.go 51.92% <0.00%> (+11.53%) ⬆️

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 923546c...82af66e. Read the comment docs.

@vishalchangrani vishalchangrani merged commit 7c4f69a into master Nov 30, 2021
@vishalchangrani vishalchangrani deleted the vishal/unskipping_ghost_node_test branch November 30, 2021 02:24
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