Skip to content

Proposal: build tags for integration tests #4276

@kyessenov

Description

@kyessenov

Istio tests are written using standard go tests, which causes friction with the go test driver:

  • integration tests should not be run in parallel, since they can operate on the same files or use the same cluster environment
  • integration tests should not be cached, since they are not necessarily hermetic
  • arguably, integration tests should not participate in race coverage tests

A test qualifies to be integration if it uses an extra binary (e.g. envoy) or external resources (docker, kubernetes).

I propose we annotate all integration tests with:

// +build integration

and skip them in unit test tasks in CI with:

go test -tags='!integration'

We can also be more specific, and use envoy and kubernetes qualifiers:

// +build integration kubernetes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions