mirror of https://github.com/linkerd/linkerd2.git
conformance validation: add new helper to `testutil` (#4532)
Adds a new helper function to make TestHelper initialization more relaxed for linkerd2-conformance and other test use-cases.
This commit is contained in:
parent
7a9527bf00
commit
6174b194fe
|
@ -61,6 +61,39 @@ var LinkerdDeployReplicas = map[string]deploySpec{
|
||||||
"linkerd-proxy-injector": {1, []string{"proxy-injector"}},
|
"linkerd-proxy-injector": {1, []string{"proxy-injector"}},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewGenericTestHelper returns a new *TestHelper from the options provided as function parameters.
|
||||||
|
// This helper was created to be able to reuse this package without hard restrictions
|
||||||
|
// as seen in `NewTestHelper()` which is primarily used with integration tests
|
||||||
|
// See - https://github.com/linkerd/linkerd2/issues/4530
|
||||||
|
func NewGenericTestHelper(
|
||||||
|
linkerd,
|
||||||
|
namespace,
|
||||||
|
upgradeFromVersion,
|
||||||
|
clusterDomain,
|
||||||
|
helmPath,
|
||||||
|
helmChart,
|
||||||
|
helmStableChart,
|
||||||
|
helmReleaseName string,
|
||||||
|
externalIssuer,
|
||||||
|
uninstall bool,
|
||||||
|
) *TestHelper {
|
||||||
|
return &TestHelper{
|
||||||
|
linkerd: linkerd,
|
||||||
|
namespace: namespace,
|
||||||
|
upgradeFromVersion: upgradeFromVersion,
|
||||||
|
helm: helm{
|
||||||
|
path: helmPath,
|
||||||
|
chart: helmChart,
|
||||||
|
stableChart: helmStableChart,
|
||||||
|
releaseName: helmReleaseName,
|
||||||
|
upgradeFromVersion: upgradeFromVersion,
|
||||||
|
},
|
||||||
|
clusterDomain: clusterDomain,
|
||||||
|
externalIssuer: externalIssuer,
|
||||||
|
uninstall: uninstall,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// NewTestHelper creates a new instance of TestHelper for the current test run.
|
// NewTestHelper creates a new instance of TestHelper for the current test run.
|
||||||
// The new TestHelper can be configured via command line flags.
|
// The new TestHelper can be configured via command line flags.
|
||||||
func NewTestHelper() *TestHelper {
|
func NewTestHelper() *TestHelper {
|
||||||
|
|
Loading…
Reference in New Issue