Skip to content

testing: add "-integration" flag for running integration tests #46409

@DmitriyVTitov

Description

@DmitriyVTitov

Go testing framework has only one pre-built flag "-test.short" which is not very clear for me. Often I write integration tests which communicate with external dependencies such as databases and API across the network. These tests should not run along with unit tests.
I would like to have built-in flag "-test.integration" which works like "-test.short" to use within integration tests like this:

	if !testing.Integration() {
		t.Skip("use '-integration' flag to run this test")
	}

English is not my native so maybe name is not the best, but I'm sure we need such flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions