Skip to content

Commit

Permalink
test: drop tests with old Talos compatibility
Browse files Browse the repository at this point in the history
We no longer support Talos releases without SideroLink.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Apr 5, 2023
1 parent 9121a3b commit b6235eb
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 270 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ MODULE := $(shell head -1 go.mod | cut -d' ' -f2)
ARTIFACTS := _out
TEST_PKGS ?= ./...
TALOS_RELEASE ?= v1.4.0-beta.0
PREVIOUS_TALOS_RELEASE ?= v0.13.4
DEFAULT_K8S_VERSION ?= v1.26.0

TOOLS ?= ghcr.io/siderolabs/tools:v1.4.0
Expand Down Expand Up @@ -172,7 +171,6 @@ run-sfyra: talos-artifacts clusterctl-release ## Run Sfyra integration test.
@ARTIFACTS=$(ARTIFACTS) \
CLUSTERCTL_CONFIG=$(SFYRA_CLUSTERCTL_CONFIG) \
TALOS_RELEASE=$(TALOS_RELEASE) \
PREVIOUS_TALOS_RELEASE=$(PREVIOUS_TALOS_RELEASE) \
./hack/scripts/integration-test.sh

# Development
Expand Down
8 changes: 1 addition & 7 deletions hack/scripts/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@ else
PREFIX=
fi

COMPATIBILITY_TESTS_ARGS=

if [[ ! -z "${PREVIOUS_TALOS_RELEASE}" ]]; then
COMPATIBILITY_TESTS_ARGS="--prev-talos-release=${PREVIOUS_TALOS_RELEASE}"
fi

${PREFIX} "${INTEGRATION_TEST}" test integration \
--talosctl-path "${TALOSCTL}" \
--clusterctl-config "${CLUSTERCTL_CONFIG}" \
--power-simulated-explicit-failure-prob=0.1 \
--power-simulated-silent-failure-prob=0.0 \
${COMPATIBILITY_TESTS_ARGS} ${REGISTRY_MIRROR_FLAGS} ${SFYRA_EXTRA_FLAGS}
${REGISTRY_MIRROR_FLAGS} ${SFYRA_EXTRA_FLAGS}
3 changes: 1 addition & 2 deletions sfyra/cmd/sfyra/cmd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ type Options struct {

DefaultBootOrder string

TalosctlPath string
PrevTalosRelease string
TalosctlPath string

PowerSimulatedExplicitFailureProb float64
PowerSimulatedSilentFailureProb float64
Expand Down
2 changes: 0 additions & 2 deletions sfyra/cmd/sfyra/cmd/test_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ var testIntegrationCmd = &cobra.Command{
RunTestPattern: runTestPattern,

TalosRelease: TalosRelease,
PrevTalosRelease: options.PrevTalosRelease,
KubernetesVersion: KubernetesVersion,
}); !ok {
return fmt.Errorf("test failure")
Expand Down Expand Up @@ -145,5 +144,4 @@ func init() {
testIntegrationCmd.Flags().Float64Var(&options.PowerSimulatedExplicitFailureProb, "power-simulated-explicit-failure-prob", options.PowerSimulatedExplicitFailureProb, "simulated power management explicit failure probability")
testIntegrationCmd.Flags().Float64Var(&options.PowerSimulatedSilentFailureProb, "power-simulated-silent-failure-prob", options.PowerSimulatedSilentFailureProb, "simulated power management silent failure probability")
testIntegrationCmd.Flags().StringVar(&runTestPattern, "test.run", "", "tests to run (regular expression)")
testIntegrationCmd.Flags().StringVar(&options.PrevTalosRelease, "prev-talos-release", options.PrevTalosRelease, "Talos version to run compatibility tests against")
}
29 changes: 3 additions & 26 deletions sfyra/pkg/tests/cluster_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,12 @@ import (
"github.com/siderolabs/sidero/sfyra/pkg/vm"
)

type clusterOptions struct {
configURL string
}

type clusterOption func(o *clusterOptions)

func withConfigURL(value string) clusterOption {
return func(o *clusterOptions) {
o.configURL = value
}
}

// createCluster without waiting for it to become ready.
func createCluster(ctx context.Context, t *testing.T, metalClient client.Client, capiCluster talos.Cluster, vmSet *vm.Set,
capiManager *capi.Manager, clusterName, serverClassName string, loadbalancerPort int, controlPlaneNodes, workerNodes int64, talosVersion, kubernetesVersion string, options ...clusterOption,
capiManager *capi.Manager, clusterName, serverClassName string, loadbalancerPort int, controlPlaneNodes, workerNodes int64, talosVersion, kubernetesVersion string,
) *loadbalancer.ControlPlane {
t.Logf("deploying cluster %q from server class %q with loadbalancer port %d", clusterName, serverClassName, loadbalancerPort)

var opts clusterOptions
for _, o := range options {
o(&opts)
}

kubeconfig, err := capiManager.GetKubeconfig(ctx)
require.NoError(t, err)

Expand All @@ -80,12 +63,6 @@ func createCluster(ctx context.Context, t *testing.T, metalClient client.Client,
WorkerMachineCount: &workerNodes,
}

if opts.configURL != "" {
templateOptions.URLSource = &capiclient.URLSourceOptions{
URL: opts.configURL,
}
}

template, err := capiClient.GetClusterTemplate(templateOptions)
require.NoError(t, err)

Expand Down Expand Up @@ -157,9 +134,9 @@ func waitForClusterReady(ctx context.Context, t *testing.T, metalClient client.C
}

func deployCluster(ctx context.Context, t *testing.T, metalClient client.Client, capiCluster talos.Cluster, vmSet *vm.Set,
capiManager *capi.Manager, clusterName, serverClassName string, loadbalancerPort int, controlPlaneNodes, workerNodes int64, talosVersion, kubernetesVersion string, options ...clusterOption,
capiManager *capi.Manager, clusterName, serverClassName string, loadbalancerPort int, controlPlaneNodes, workerNodes int64, talosVersion, kubernetesVersion string,
) *loadbalancer.ControlPlane {
loadbalancer := createCluster(ctx, t, metalClient, capiCluster, vmSet, capiManager, clusterName, serverClassName, loadbalancerPort, controlPlaneNodes, workerNodes, talosVersion, kubernetesVersion, options...)
loadbalancer := createCluster(ctx, t, metalClient, capiCluster, vmSet, capiManager, clusterName, serverClassName, loadbalancerPort, controlPlaneNodes, workerNodes, talosVersion, kubernetesVersion)

waitForClusterReady(ctx, t, metalClient, vmSet, clusterName)

Expand Down
119 changes: 0 additions & 119 deletions sfyra/pkg/tests/compatibility.go

This file was deleted.

5 changes: 0 additions & 5 deletions sfyra/pkg/tests/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ type Options struct {
RunTestPattern string

TalosRelease string
PrevTalosRelease string
KubernetesVersion string
}

Expand Down Expand Up @@ -98,10 +97,6 @@ func Run(ctx context.Context, cluster talos.Cluster, vmSet *vm.Set, capiManager
"TestServerClassPatch",
TestServerClassPatch(ctx, metalClient, cluster, capiManager),
},
{
"TestCompatibilityCluster",
TestCompatibilityCluster(ctx, metalClient, cluster, vmSet, capiManager, options.PrevTalosRelease, "v1.22.12"),
},
{
"TestServerPXEBoot",
TestServerPXEBoot(ctx, metalClient, cluster, vmSet, capiManager, options.TalosRelease, options.KubernetesVersion),
Expand Down
107 changes: 0 additions & 107 deletions templates/cluster-template-talos-v0.13.4.yaml

This file was deleted.

0 comments on commit b6235eb

Please sign in to comment.