Skip to content

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

@n2h9

Description

@n2h9

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions