Skip to content

Commit 1599091

Browse files
authored
Remove duplicate unnecessary tests (#3143)
* Remove duplicate / unnecessary tests
1 parent 9645263 commit 1599091

File tree

8 files changed

+11
-475
lines changed

8 files changed

+11
-475
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -767,18 +767,6 @@ jobs:
767767
export RELEASE_YAML_DIR=e2e/kots-release-unsupported-overrides
768768
./scripts/ci-release-app.sh
769769
770-
# then install a version with additional failing host preflights
771-
export EC_VERSION="${{ needs.output-vars.outputs.ec_version }}"
772-
export APP_VERSION="appver-${SHORT_SHA}-failing-preflights"
773-
export RELEASE_YAML_DIR=e2e/kots-release-install-failing-preflights
774-
./scripts/ci-release-app.sh
775-
776-
# then install a version with additional warning host preflights
777-
export EC_VERSION="${{ needs.output-vars.outputs.ec_version }}"
778-
export APP_VERSION="appver-${SHORT_SHA}-warning-preflights"
779-
export RELEASE_YAML_DIR=e2e/kots-release-install-warning-preflights
780-
./scripts/ci-release-app.sh
781-
782770
# promote a release with improved dr support
783771
export EC_VERSION="${{ needs.output-vars.outputs.ec_version }}"
784772
export APP_VERSION="appver-${SHORT_SHA}-legacydr"
@@ -893,15 +881,12 @@ jobs:
893881
- TestPreflights
894882
- TestPreflightsNoexec
895883
- TestMaterialize
896-
- TestHostPreflightCustomSpec
897-
- TestHostPreflightInBuiltSpec
898884
- TestSingleNodeInstallation
899885
- TestSingleNodeInstallationAlmaLinux8
900886
- TestSingleNodeInstallationDebian11
901887
- TestSingleNodeInstallationDebian12
902888
- TestSingleNodeInstallationCentos9Stream
903889
- TestSingleNodeUpgradePreviousStable
904-
- TestInstallFromReplicatedApp
905890
- TestUpgradeFromReplicatedAppPreviousK0s
906891
- TestResetAndReinstall
907892
- TestMultiNodeInstallation
@@ -912,7 +897,6 @@ jobs:
912897
- TestMultiNodeHADisasterRecovery
913898
- TestSingleNodeInstallationNoopUpgrade
914899
- TestLocalArtifactMirror
915-
- TestMultiNodeReset
916900
- TestCollectSupportBundle
917901
- TestUnsupportedOverrides
918902
- TestHostCollectSupportBundleInCluster
@@ -984,8 +968,6 @@ jobs:
984968
- TestSingleNodeAirgapUpgrade
985969
- TestSingleNodeAirgapUpgradeSelinux
986970
- TestSingleNodeAirgapUpgradeConfigValues
987-
- TestMultiNodeAirgapUpgrade
988-
- TestMultiNodeAirgapUpgradeSameK0s
989971
- TestMultiNodeAirgapUpgradePreviousStable
990972
- TestMultiNodeAirgapHAInstallation
991973
- TestSingleNodeAirgapDisasterRecovery

.github/workflows/release-prod.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -347,18 +347,6 @@ jobs:
347347
export APP_VERSION="appver-${{ github.ref_name }}-unsupported-overrides"
348348
export RELEASE_YAML_DIR=e2e/kots-release-unsupported-overrides
349349
./scripts/ci-release-app.sh
350-
351-
# then install a version with additional failing host preflights
352-
export EC_VERSION="${{ github.ref_name }}"
353-
export APP_VERSION="appver-${{ github.ref_name }}-failing-preflights"
354-
export RELEASE_YAML_DIR=e2e/kots-release-install-failing-preflights
355-
./scripts/ci-release-app.sh
356-
357-
# then install a version with additional warning host preflights
358-
export EC_VERSION="${{ github.ref_name }}"
359-
export APP_VERSION="appver-${{ github.ref_name }}-warning-preflights"
360-
export RELEASE_YAML_DIR=e2e/kots-release-install-warning-preflights
361-
./scripts/ci-release-app.sh
362350
363351
# then a noop upgrade
364352
export EC_VERSION="${{ github.ref_name }}"
@@ -509,15 +497,12 @@ jobs:
509497
- TestPreflights
510498
- TestPreflightsNoexec
511499
- TestMaterialize
512-
- TestHostPreflightCustomSpec
513-
- TestHostPreflightInBuiltSpec
514500
- TestSingleNodeInstallation
515501
- TestSingleNodeInstallationAlmaLinux8
516502
- TestSingleNodeInstallationDebian11
517503
- TestSingleNodeInstallationDebian12
518504
- TestSingleNodeInstallationCentos9Stream
519505
- TestSingleNodeUpgradePreviousStable
520-
- TestInstallFromReplicatedApp
521506
- TestUpgradeFromReplicatedApp
522507
- TestResetAndReinstall
523508
- TestMultiNodeInstallation
@@ -527,7 +512,6 @@ jobs:
527512
- TestMultiNodeHADisasterRecovery
528513
- TestSingleNodeInstallationNoopUpgrade
529514
- TestLocalArtifactMirror
530-
- TestMultiNodeReset
531515
- TestCollectSupportBundle
532516
- TestUnsupportedOverrides
533517
- TestHostCollectSupportBundleInCluster
@@ -599,8 +583,6 @@ jobs:
599583
- TestSingleNodeAirgapUpgrade
600584
- TestSingleNodeAirgapUpgradeSelinux
601585
- TestSingleNodeAirgapUpgradeConfigValues
602-
- TestMultiNodeAirgapUpgrade
603-
- TestMultiNodeAirgapUpgradeSameK0s
604586
- TestMultiNodeAirgapUpgradePreviousStable
605587
- TestMultiNodeAirgapHAInstallation
606588
- TestSingleNodeAirgapDisasterRecovery

e2e/install_test.go

Lines changed: 0 additions & 259 deletions
Original file line numberDiff line numberDiff line change
@@ -252,76 +252,6 @@ func TestSingleNodeInstallationCentos9Stream(t *testing.T) {
252252
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
253253
}
254254

255-
func TestHostPreflightCustomSpec(t *testing.T) {
256-
t.Parallel()
257-
258-
RequireEnvVars(t, []string{"SHORT_SHA"})
259-
260-
tc := docker.NewCluster(&docker.ClusterInput{
261-
T: t,
262-
Nodes: 1,
263-
Distro: "centos-9",
264-
})
265-
defer tc.Cleanup()
266-
267-
t.Logf("%s: installing test dependencies on node 0", time.Now().Format(time.RFC3339))
268-
line := []string{"yum", "install", "-y", "fio"}
269-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
270-
t.Fatalf("fail to install dependencies on node 0: %v: %s: %s", err, stdout, stderr)
271-
}
272-
273-
downloadECReleaseWithOptions(t, tc, 0, downloadECReleaseOptions{
274-
version: fmt.Sprintf("appver-%s-failing-preflights", os.Getenv("SHORT_SHA")),
275-
})
276-
277-
t.Logf("%s: moving embedded-cluster to /usr/local/bin/embedded-cluster-failing-preflights", time.Now().Format(time.RFC3339))
278-
line = []string{"mv", "/usr/local/bin/embedded-cluster", "/usr/local/bin/embedded-cluster-failing-preflights"}
279-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
280-
t.Fatalf("fail to move embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr)
281-
}
282-
283-
t.Logf("%s: removing the original license file", time.Now().Format(time.RFC3339))
284-
line = []string{"rm", "/assets/license.yaml"}
285-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
286-
t.Fatalf("fail to remove /assets/license.yaml on node 0: %v: %s: %s", err, stdout, stderr)
287-
}
288-
289-
downloadECReleaseWithOptions(t, tc, 0, downloadECReleaseOptions{
290-
version: fmt.Sprintf("appver-%s-warning-preflights", os.Getenv("SHORT_SHA")),
291-
})
292-
293-
t.Logf("%s: running embedded-cluster preflights on node 0", time.Now().Format(time.RFC3339))
294-
line = []string{"embedded-preflight.sh"}
295-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
296-
t.Fatalf("fail to install embedded-cluster on node 0: %v: %s: %s", err, stdout, stderr)
297-
}
298-
299-
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
300-
}
301-
302-
func TestHostPreflightInBuiltSpec(t *testing.T) {
303-
t.Parallel()
304-
305-
RequireEnvVars(t, []string{"SHORT_SHA"})
306-
307-
tc := docker.NewCluster(&docker.ClusterInput{
308-
T: t,
309-
Nodes: 1,
310-
Distro: "centos-9",
311-
LicensePath: "licenses/license.yaml",
312-
ECBinaryPath: "../output/bin/embedded-cluster",
313-
})
314-
defer tc.Cleanup()
315-
316-
t.Logf("%s: install single node with in-built host preflights", time.Now().Format(time.RFC3339))
317-
line := []string{"single-node-host-preflight-install.sh"}
318-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
319-
t.Fatalf("fail to install embedded-cluster node with host preflights: %v: %s: %s", err, stdout, stderr)
320-
}
321-
322-
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
323-
}
324-
325255
// This test creates 4 nodes, installs on the first one and then generate 2 join tokens
326256
// for controllers and one join token for worker nodes. Joins the nodes and then waits
327257
// for them to report ready.
@@ -371,40 +301,6 @@ func TestMultiNodeInstallation(t *testing.T) {
371301
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
372302
}
373303

374-
func TestInstallFromReplicatedApp(t *testing.T) {
375-
t.Parallel()
376-
377-
RequireEnvVars(t, []string{"SHORT_SHA"})
378-
379-
tc := docker.NewCluster(&docker.ClusterInput{
380-
T: t,
381-
Nodes: 1,
382-
Distro: "debian-bookworm",
383-
})
384-
defer tc.Cleanup()
385-
386-
downloadECRelease(t, tc, 0)
387-
installSingleNode(t, tc)
388-
389-
if stdout, stderr, err := tc.SetupPlaywrightAndRunTest("deploy-app"); err != nil {
390-
t.Fatalf("fail to run playwright test deploy-app: %v: %s: %s", err, stdout, stderr)
391-
}
392-
393-
checkInstallationState(t, tc)
394-
395-
appUpgradeVersion := fmt.Sprintf("appver-%s-upgrade", os.Getenv("SHORT_SHA"))
396-
testArgs := []string{appUpgradeVersion}
397-
398-
t.Logf("%s: upgrading cluster", time.Now().Format(time.RFC3339))
399-
if stdout, stderr, err := tc.RunPlaywrightTest("deploy-upgrade", testArgs...); err != nil {
400-
t.Fatalf("fail to run playwright test deploy-app: %v: %s: %s", err, stdout, stderr)
401-
}
402-
403-
checkPostUpgradeState(t, tc)
404-
405-
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
406-
}
407-
408304
func TestSingleNodeUpgradePreviousStable(t *testing.T) {
409305
t.Parallel()
410306

@@ -850,161 +746,6 @@ func TestSingleNodeAirgapUpgradeSelinux(t *testing.T) {
850746
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
851747
}
852748

853-
func TestMultiNodeAirgapUpgradeSameK0s(t *testing.T) {
854-
t.Parallel()
855-
856-
RequireEnvVars(t, []string{"SHORT_SHA"})
857-
858-
tc := cmx.NewCluster(&cmx.ClusterInput{
859-
T: t,
860-
Nodes: 2,
861-
Distribution: "ubuntu",
862-
Version: "22.04",
863-
InstanceType: "r1.medium",
864-
})
865-
defer tc.Cleanup()
866-
867-
t.Logf("%s: downloading airgap files", time.Now().Format(time.RFC3339))
868-
initialVersion := fmt.Sprintf("appver-%s", os.Getenv("SHORT_SHA"))
869-
upgradeVersion := fmt.Sprintf("appver-%s-upgrade", os.Getenv("SHORT_SHA"))
870-
runInParallel(t,
871-
func(t *testing.T) error {
872-
return downloadAirgapBundleOnNode(t, tc, 0, initialVersion, AirgapInstallBundlePath, AirgapLicenseID)
873-
},
874-
func(t *testing.T) error {
875-
return downloadAirgapBundleOnNode(t, tc, 0, upgradeVersion, AirgapUpgradeBundlePath, AirgapLicenseID)
876-
},
877-
)
878-
879-
t.Logf("%s: airgapping cluster", time.Now().Format(time.RFC3339))
880-
if err := tc.Airgap(); err != nil {
881-
t.Fatalf("failed to airgap cluster: %v", err)
882-
}
883-
884-
t.Logf("%s: preparing embedded cluster airgap files on node 0", time.Now().Format(time.RFC3339))
885-
line := []string{"airgap-prepare.sh"}
886-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
887-
t.Fatalf("fail to prepare airgap files on node 0: %v: %s: %s", err, stdout, stderr)
888-
}
889-
890-
installSingleNodeWithOptions(t, tc, installOptions{
891-
isAirgap: true,
892-
})
893-
894-
if stdout, stderr, err := tc.SetupPlaywrightAndRunTest("deploy-app"); err != nil {
895-
t.Fatalf("fail to run playwright test deploy-app: %v: %s: %s", err, stdout, stderr)
896-
}
897-
898-
// join a worker
899-
joinWorkerNode(t, tc, 1)
900-
901-
// wait for the nodes to report as ready.
902-
waitForNodes(t, tc, 2, nil)
903-
904-
t.Logf("%s: checking installation state after app deployment", time.Now().Format(time.RFC3339))
905-
line = []string{"check-airgap-installation-state.sh", fmt.Sprintf("appver-%s", os.Getenv("SHORT_SHA")), k8sVersion()}
906-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
907-
t.Fatalf("fail to check installation state: %v: %s: %s", err, stdout, stderr)
908-
}
909-
910-
t.Logf("%s: running airgap update", time.Now().Format(time.RFC3339))
911-
line = []string{"airgap-update.sh"}
912-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
913-
t.Fatalf("fail to run airgap update: %v: %s: %s", err, stdout, stderr)
914-
}
915-
916-
appUpgradeVersion := fmt.Sprintf("appver-%s-upgrade", os.Getenv("SHORT_SHA"))
917-
testArgs := []string{appUpgradeVersion}
918-
919-
t.Logf("%s: upgrading cluster", time.Now().Format(time.RFC3339))
920-
if stdout, stderr, err := tc.RunPlaywrightTest("deploy-upgrade", testArgs...); err != nil {
921-
t.Fatalf("fail to run playwright test deploy-upgrade: %v: %s: %s", err, stdout, stderr)
922-
}
923-
924-
checkPostUpgradeState(t, tc)
925-
926-
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
927-
}
928-
929-
func TestMultiNodeAirgapUpgrade(t *testing.T) {
930-
t.Parallel()
931-
932-
RequireEnvVars(t, []string{"SHORT_SHA"})
933-
934-
tc := cmx.NewCluster(&cmx.ClusterInput{
935-
T: t,
936-
Nodes: 2,
937-
Distribution: "ubuntu",
938-
Version: "22.04",
939-
InstanceType: "r1.medium",
940-
})
941-
defer tc.Cleanup()
942-
943-
t.Logf("%s: downloading airgap files", time.Now().Format(time.RFC3339))
944-
// Previous stable EC version with a -1 minor k0s version
945-
initialVersion := fmt.Sprintf("appver-%s-previous-stable", os.Getenv("SHORT_SHA"))
946-
upgradeVersion := fmt.Sprintf("appver-%s-upgrade", os.Getenv("SHORT_SHA"))
947-
runInParallel(t,
948-
func(t *testing.T) error {
949-
return downloadAirgapBundleOnNode(t, tc, 0, initialVersion, AirgapInstallBundlePath, AirgapLicenseID)
950-
},
951-
func(t *testing.T) error {
952-
return downloadAirgapBundleOnNode(t, tc, 0, upgradeVersion, AirgapUpgradeBundlePath, AirgapLicenseID)
953-
},
954-
)
955-
956-
t.Logf("%s: airgapping cluster", time.Now().Format(time.RFC3339))
957-
if err := tc.Airgap(); err != nil {
958-
t.Fatalf("failed to airgap cluster: %v", err)
959-
}
960-
961-
t.Logf("%s: preparing embedded cluster airgap files on node 0", time.Now().Format(time.RFC3339))
962-
line := []string{"airgap-prepare.sh"}
963-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
964-
t.Fatalf("fail to prepare airgap files on node 0: %v: %s: %s", err, stdout, stderr)
965-
}
966-
967-
installSingleNodeWithOptions(t, tc, installOptions{
968-
isAirgap: true,
969-
version: initialVersion,
970-
localArtifactMirrorPort: "50001", // choose an alternate lam port
971-
})
972-
973-
if stdout, stderr, err := tc.SetupPlaywrightAndRunTest("deploy-app"); err != nil {
974-
t.Fatalf("fail to run playwright test deploy-app: %v: %s: %s", err, stdout, stderr)
975-
}
976-
977-
// join a worker
978-
joinWorkerNode(t, tc, 1)
979-
980-
// wait for the nodes to report as ready.
981-
waitForNodes(t, tc, 2, nil)
982-
983-
t.Logf("%s: checking installation state after app deployment", time.Now().Format(time.RFC3339))
984-
line = []string{"check-airgap-installation-state.sh", initialVersion, k8sVersionPreviousStable()}
985-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
986-
t.Fatalf("fail to check installation state: %v: %s: %s", err, stdout, stderr)
987-
}
988-
989-
t.Logf("%s: running airgap update", time.Now().Format(time.RFC3339))
990-
line = []string{"airgap-update.sh"}
991-
if stdout, stderr, err := tc.RunCommandOnNode(0, line); err != nil {
992-
t.Fatalf("fail to run airgap update: %v: %s: %s", err, stdout, stderr)
993-
}
994-
995-
appUpgradeVersion := fmt.Sprintf("appver-%s-upgrade", os.Getenv("SHORT_SHA"))
996-
testArgs := []string{appUpgradeVersion}
997-
998-
t.Logf("%s: upgrading cluster", time.Now().Format(time.RFC3339))
999-
if stdout, stderr, err := tc.RunPlaywrightTest("deploy-upgrade", testArgs...); err != nil {
1000-
t.Fatalf("fail to run playwright test deploy-upgrade: %v: %s: %s", err, stdout, stderr)
1001-
}
1002-
1003-
checkPostUpgradeState(t, tc)
1004-
1005-
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
1006-
}
1007-
1008749
func TestMultiNodeAirgapUpgradePreviousStable(t *testing.T) {
1009750
t.Parallel()
1010751

0 commit comments

Comments
 (0)