Skip to content

Mysql input plugin needs tests #8561

@reimda

Description

@reimda

Current behavior:

The mysql plugin has very few tests. The existing unit tests cover only narrow parsing tasks. There are a couple integration tests related to connecting. There are no tests related to gathering metrics.

related: #6132

Desired behavior:

Unit tests covering the functionality of the plugin. Include mocking the response from mysql so tests can cover metric generation.

We also need integration tests that check the names and types of values received from mysql. This plugin's fields and field types depend on what it receives from mysql. There have been multiple bugs in telegraf related to the types changing between mysql versions (#5529 #5055). The integration test should check the names and types of fields so we can know when a field type has changed before a user files a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mysqlfeature requestRequests for new plugin and for new features to existing plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions