Skip to content

Reattach in tests with versioned plugins #310

Description

@lovromazgon

I've got a test that runs the plugin server in a goroutine and fetches the reattach config from the server using ServeTestConfig.ReattachConfigCh, passing it to the client. The problem is that the server and client are versioned, so the client config has a map of VersionedPlugins while Plugins is empty. When the client is created using the reattach config, Client.Start exits early by calling c.reattach(), skipping the part where the plugin version is determined and leaving ClientConfig.Plugins set to nil. The client is therefore not initialized correctly and can't be used.

I found that executing the version handshake when reattaching solves my problem. Before opening a PR I wanted to ask if this is the proper way to address this issue, or if I'm missing something else.

lovromazgon@a3d2cd0

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions