forked from rook/rook
test: upgrade tests to update from v1.11
With the upcoming v1.12 release, Rook upgrade tests should upgrade from v1.11.x to master instead of from v1.10.x to master. Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
This commit is contained in:
@@ -66,7 +66,7 @@ func NewCephManifests(settings *TestCephSettings) CephManifests {
|
||||
switch settings.RookVersion {
|
||||
case LocalBuildTag:
|
||||
return &CephManifestsMaster{settings}
|
||||
case Version1_10:
|
||||
case Version1_11:
|
||||
return &CephManifestsPreviousVersion{settings, &CephManifestsMaster{settings}}
|
||||
}
|
||||
panic(fmt.Errorf("unrecognized ceph manifest version: %s", settings.RookVersion))
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
|
||||
const (
|
||||
// The version from which the upgrade test will start
|
||||
Version1_10 = "v1.10.10"
|
||||
Version1_11 = "v1.11.7"
|
||||
)
|
||||
|
||||
// CephManifestsPreviousVersion wraps rook yaml definitions
|
||||
@@ -86,13 +86,7 @@ func (m *CephManifestsPreviousVersion) GetCommonExternal() string {
|
||||
|
||||
// GetRookCluster returns rook-cluster manifest
|
||||
func (m *CephManifestsPreviousVersion) GetCephCluster() string {
|
||||
c := m.latest.GetCephCluster()
|
||||
|
||||
// Remove the requireMsgr2 setting if in v1.10
|
||||
if m.settings.RookVersion == Version1_10 {
|
||||
return strings.Replace(c, "requireMsgr2: false", "", 1)
|
||||
}
|
||||
return c
|
||||
return m.latest.GetCephCluster()
|
||||
}
|
||||
|
||||
func (m *CephManifestsPreviousVersion) GetBlockSnapshotClass(snapshotClassName, reclaimPolicy string) string {
|
||||
|
||||
@@ -88,7 +88,7 @@ func (s *UpgradeSuite) baseSetup(useHelm bool, initialCephVersion v1.CephVersion
|
||||
Mons: 1,
|
||||
EnableDiscovery: true,
|
||||
SkipClusterCleanup: true,
|
||||
RookVersion: installer.Version1_10,
|
||||
RookVersion: installer.Version1_11,
|
||||
CephVersion: initialCephVersion,
|
||||
}
|
||||
|
||||
@@ -127,9 +127,9 @@ func (s *UpgradeSuite) testUpgrade(useHelm bool, initialCephVersion v1.CephVersi
|
||||
_ = s.helper.BucketClient.DeleteBucketStorageClass(s.namespace, installer.ObjectStoreName, installer.ObjectStoreSCName, "Delete")
|
||||
|
||||
//
|
||||
// Upgrade Rook from v1.9 to master
|
||||
// Upgrade Rook from v1.11 to master
|
||||
//
|
||||
logger.Infof("*** UPGRADING ROOK FROM %s to master ***", installer.Version1_10)
|
||||
logger.Infof("*** UPGRADING ROOK FROM %s to master ***", installer.Version1_11)
|
||||
s.gatherLogs(s.settings.OperatorNamespace, "_before_master_upgrade")
|
||||
s.upgradeToMaster()
|
||||
|
||||
@@ -138,7 +138,7 @@ func (s *UpgradeSuite) testUpgrade(useHelm bool, initialCephVersion v1.CephVersi
|
||||
err := s.installer.WaitForToolbox(s.namespace)
|
||||
assert.NoError(s.T(), err)
|
||||
|
||||
logger.Infof("Done with automatic upgrade from %s to master", installer.Version1_10)
|
||||
logger.Infof("Done with automatic upgrade from %s to master", installer.Version1_11)
|
||||
newFile := "post-upgrade-previous-to-master-file"
|
||||
s.verifyFilesAfterUpgrade(newFile, rbdFilesToRead, cephfsFilesToRead)
|
||||
rbdFilesToRead = append(rbdFilesToRead, newFile)
|
||||
@@ -150,7 +150,7 @@ func (s *UpgradeSuite) testUpgrade(useHelm bool, initialCephVersion v1.CephVersi
|
||||
// do not need retry b/c the OBC controller runs parallel to Rook-Ceph orchestration
|
||||
assert.True(s.T(), s.helper.BucketClient.CheckOBC(obcName, "bound"))
|
||||
|
||||
logger.Infof("Verified upgrade from %s to master", installer.Version1_10)
|
||||
logger.Infof("Verified upgrade from %s to master", installer.Version1_11)
|
||||
|
||||
// SKIP the Ceph version upgrades for the helm test
|
||||
if s.settings.UseHelm {
|
||||
@@ -286,7 +286,7 @@ func (s *UpgradeSuite) deployClusterforUpgrade(objectUserID, preFilename string)
|
||||
require.True(s.T(), created)
|
||||
|
||||
// verify that we're actually running the right pre-upgrade image
|
||||
s.verifyOperatorImage(installer.Version1_10)
|
||||
s.verifyOperatorImage(installer.Version1_11)
|
||||
|
||||
assert.NoError(s.T(), s.k8sh.WriteToPod("", rbdPodName, preFilename, simpleTestMessage))
|
||||
assert.NoError(s.T(), s.k8sh.ReadFromPod("", rbdPodName, preFilename, simpleTestMessage))
|
||||
|
||||
Reference in New Issue
Block a user