Skip to content

Astarte Export: Add Test for Exporting Data by device_id #1052

@osmanhadzic

Description

@osmanhadzic

Enhance the automated tests for Astarte tools by adding a test case to validate data export by device_id:

  • Add two devices to the test database.
  • Ensure that the export retrieves data for only one device based on the specified device_id.
  • Verify the validity of the exported data.

Environment Setup

To run the test, ensure the following environment variables are set:

export CASSANDRA_DB_HOST="127.0.0.1"  
export CASSANDRA_DB_PORT=9042  
export CASSANDRA_NODES="localhost:9042" 

Additionally, ensure the Scylla database is running and port 9042 is exposed.

To Reproduce

  1. Insert two devices into the test database.
  2. Run the export functionality with a specific device_id.
  3. Check the exported data to ensure it matches the device_id criteria.
  4. Validate the integrity and accuracy of the exported data.

Tasks

  • Add two devices to the test database.
  • Implement a test case to export data for a single device_id.
  • Validate that the export retrieves data for only the specified device_id.
  • Verify the validity and accuracy of the exported data.
  • Ensure that all existing tests pass after the changes.

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