meshsync icon indicating copy to clipboard operation
meshsync copied to clipboard

[integration tests] Add integration test for the case when meshsync receive messages from broker

Open n2h9 opened this issue 3 months ago • 0 comments

Current Behavior There are integration tests for meshsync which convers flow when meshsync connects to k8s cluster and publish messages to broker.

But meshsync also has a flow when it receives messages from broker, f.e. to trigger Resync of resource information. This flow is not covered.

Integration tests elements:

Hint: you can run integration test locally, you need docker, kind and kubectl.

Desired Behavior

There are two places where meshsync subscribes to broker (search by SubscribeWithChannel):

  • meshsync/handler.go ;
  • meshsync/exec.go (not sure if this code is in use, we may or may not need to cover it with integration tests);

Need to cover them with integration tests.Starting from meshsync/handler.go.

The flow could be as follow: run meshsync - subscribe to broker - send messages to broker, assert that meshsync behaves as expected (mist probably by receiving data from meshsync through broker).

F.e. in the event of ResyncRequest. After sending Resync Request test code is expecting to receive information about cluster through broker in dedicated channel.

Contributor Resources

The meshery.io website uses Jekyll and GitHub Pages. Site content is found under the master branch.

n2h9 avatar Oct 18 '25 15:10 n2h9