Merge pull request #17857 from jhoblitt/convert-smoke-object-to-sharedstore
test: build the smoke object store with the shared store fixture
This commit is contained in:
3 files changed
+13
-14
No files matched your search
@@ -214,7 +214,7 @@ func runObjectE2ETest(helper *clients.TestClient, k8sh *utils.K8sHelper, install
|
||||
// now test operation of the first object store
|
||||
testObjectStoreOperations(s, helper, k8sh, settings, storeName, swiftAndKeystone)
|
||||
|
||||
sharedObjectStore := sharedstore.Create(s.T(), k8sh, installer, tlsEnable,
|
||||
sharedObjectStore := sharedstore.Create(s.T(), k8sh, installer, tlsEnable, settings.Namespace, "sharedstore", 1,
|
||||
bucketowner.Namespace,
|
||||
bucketpolicy.Namespace,
|
||||
bucketquota.Namespace,
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/rook/rook/tests/framework/clients"
|
||||
"github.com/rook/rook/tests/framework/installer"
|
||||
"github.com/rook/rook/tests/framework/utils"
|
||||
"github.com/rook/rook/tests/integration/object/util/sharedstore"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
@@ -125,10 +126,8 @@ func (s *SmokeSuite) TestObjectStorage_SmokeTest() {
|
||||
if utils.IsPlatformOpenShift() {
|
||||
s.T().Skip("object store tests skipped on openshift")
|
||||
}
|
||||
storeName := "lite-store"
|
||||
deleteStore := true
|
||||
tls := false
|
||||
runObjectE2ETestLite(s.T(), s.helper, s.k8sh, s.installer, s.settings.Namespace, storeName, 2, deleteStore, tls, false)
|
||||
store := sharedstore.Create(s.T(), s.k8sh, s.installer, false, s.settings.Namespace, "lite-store", 2)
|
||||
store.Destroy()
|
||||
}
|
||||
|
||||
// Test to make sure all rook components are installed and Running
|
||||
|
||||
@@ -68,17 +68,17 @@ func (s *Sharedstore) Destroy() {
|
||||
s.destroy()
|
||||
}
|
||||
|
||||
// Setup creates a shared CephObjectStore and its NodePort Service in
|
||||
// ObjectStoreNamespace, waits for the store to become Ready, and returns a
|
||||
// teardown function that deletes both resources. The teardown function should
|
||||
// be deferred by the caller.
|
||||
func Create(t *testing.T, k8sh *utils.K8sHelper, installer *installer.CephInstaller, tlsEnable bool, allowedNamespaces ...string) *Sharedstore {
|
||||
// Create creates a CephObjectStore named storeName in namespace (with its
|
||||
// realm, zone, shared pools, and NodePort Service), waits for it to become
|
||||
// Ready, and returns a Sharedstore whose Destroy method tears it all down;
|
||||
// Destroy should be deferred by the caller. instances sets the RGW gateway
|
||||
// count and allowedNamespaces is propagated to AllowUsersInNamespaces.
|
||||
func Create(t *testing.T, k8sh *utils.K8sHelper, installer *installer.CephInstaller, tlsEnable bool, namespace, storeName string, instances int32, allowedNamespaces ...string) *Sharedstore {
|
||||
t.Helper()
|
||||
|
||||
s := &Sharedstore{tlsEnable: tlsEnable}
|
||||
ctx := context.TODO()
|
||||
ns := "object-ns"
|
||||
storeName := "sharedstore"
|
||||
ns := namespace
|
||||
|
||||
// securePort is the in-container RGW TLS listener port. The NodePort Service
|
||||
// below exposes the conventional 443 externally and forwards to it.
|
||||
@@ -154,7 +154,7 @@ func Create(t *testing.T, k8sh *utils.K8sHelper, installer *installer.CephInstal
|
||||
},
|
||||
Gateway: cephv1.GatewaySpec{
|
||||
Port: 80,
|
||||
Instances: 1,
|
||||
Instances: instances,
|
||||
},
|
||||
AllowUsersInNamespaces: allowedNamespaces,
|
||||
},
|
||||
@@ -166,7 +166,7 @@ func Create(t *testing.T, k8sh *utils.K8sHelper, installer *installer.CephInstal
|
||||
objectStore.Spec.Gateway = cephv1.GatewaySpec{
|
||||
SecurePort: securePort,
|
||||
SSLCertificateRef: certSecretName,
|
||||
Instances: 1,
|
||||
Instances: instances,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user