Skip to content

make integration tests support checking more than one span of output #86

Open

Description

@tobert

The current "span_data" check in the test fixtures only supports one span. That's a result of the way I originally wrote it for one span then expanded to multiple and haven't used it much. In working with @edw-eqix on some test PRs we realized this.

I think the JSON would end up looking like:

[
  {
    "expect": {
      "output": "hello world\n",
      "spans": 2,
      "span_data": [
            {
              "trace_id": "edededededededededededededed9000",
              "span_id": "*",
              "is_sampled": "true"
            },
            {
              "trace_id": "*",
              "span_id": "*",
              "is_sampled": "true"
            }
      ]
    }
  }
]

So we have a list of spans to check instead of a single span hash.

A trick here is that technically spans can come into the server out of order. The simplest way forward for now is probably to call sort.Sort() on a CliEventList of spans. This will require a little refactoring and maybe extra work to make sure all spans are captured and passed back correctly.

Activity

  1. added
    bugSomething isn't working
    testingtests and test infrastructure
    on Sep 20, 2021
  2. tobert commented on Jun 26, 2023

    @tobert
    ContributorAuthor

    Added multiple span support to otel-cli status in #227

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

    bugSomething isn't workingtestingtests and test infrastructure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions