mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 13:55:55 +00:00
b21851c903
This can help conditionally change test behavior if the test is executing in enterprise without the need to split the test with build tags.
14 lines
337 B
Go
14 lines
337 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package versiontest
|
|
|
|
import "github.com/hashicorp/consul/version"
|
|
|
|
// IsEnterprise returns true if the current build is a Consul Enterprise build.
|
|
//
|
|
// This should only be called from test code.
|
|
func IsEnterprise() bool {
|
|
return version.VersionMetadata == "ent"
|
|
}
|