forked from rancher/distros-test-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Node replacement test --------- Signed-off-by: Francisco <[email protected]>
- Loading branch information
Showing
15 changed files
with
944 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,4 +55,4 @@ jobs: | |
with: | ||
version: v1.55.2 | ||
args: --timeout 10m | ||
continue-on-error: false | ||
continue-on-error: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
//go:build upgradereplacement | ||
|
||
package upgradecluster | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/rancher/distros-test-framework/pkg/assert" | ||
"github.com/rancher/distros-test-framework/pkg/customflag" | ||
"github.com/rancher/distros-test-framework/pkg/testcase" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
) | ||
|
||
var _ = Describe("Test:", func() { | ||
|
||
It("Start Up with no issues", func() { | ||
testcase.TestBuildCluster(GinkgoT()) | ||
}) | ||
|
||
It("Validate Node", func() { | ||
testcase.TestNodeStatus( | ||
assert.NodeAssertReadyStatus(), | ||
nil) | ||
}) | ||
|
||
It("Validate Pod", func() { | ||
testcase.TestPodStatus( | ||
assert.PodAssertRestart(), | ||
assert.PodAssertReady(), | ||
assert.PodAssertStatus()) | ||
}) | ||
|
||
It("Verifies ClusterIP Service pre-upgrade", func() { | ||
testcase.TestServiceClusterIp(true, false) | ||
}) | ||
|
||
if cfg.Product == "k3s" { | ||
It("Verifies LoadBalancer Service pre-upgrade", func() { | ||
testcase.TestServiceLoadBalancer(true, false) | ||
}) | ||
} | ||
|
||
It("Verifies Ingress pre-upgrade", func() { | ||
testcase.TestIngress(true, false) | ||
}) | ||
|
||
It("Upgrade by Node replacement", func() { | ||
testcase.TestUpgradeReplaceNode(customflag.ServiceFlag.InstallMode.String()) | ||
}) | ||
|
||
It("Checks Node Status after upgrade and validate version", func() { | ||
testcase.TestNodeStatus( | ||
assert.NodeAssertReadyStatus(), | ||
assert.NodeAssertVersionTypeUpgrade(customflag.ServiceFlag)) | ||
}) | ||
|
||
It("Checks Pod Status after upgrade", func() { | ||
testcase.TestPodStatus( | ||
assert.PodAssertRestart(), | ||
assert.PodAssertReady(), | ||
assert.PodAssertStatus(), | ||
) | ||
}) | ||
|
||
It("Verifies ClusterIP Service after upgrade", func() { | ||
testcase.TestServiceClusterIp(false, true) | ||
}) | ||
|
||
It("Verifies NodePort Service after upgrade applying and deleting workload", func() { | ||
testcase.TestServiceNodePort(true, true) | ||
}) | ||
|
||
It("Verifies Ingress after upgrade", func() { | ||
testcase.TestIngress(false, true) | ||
}) | ||
|
||
if cfg.Product == "k3s" { | ||
It("Verifies LoadBalancer Service after upgrade", func() { | ||
testcase.TestServiceLoadBalancer(false, true) | ||
}) | ||
} | ||
}) | ||
|
||
var _ = AfterEach(func() { | ||
if CurrentSpecReport().Failed() { | ||
fmt.Printf("\nFAILED! %s\n", CurrentSpecReport().FullText()) | ||
} else { | ||
fmt.Printf("\nPASSED! %s\n", CurrentSpecReport().FullText()) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.