forked from rook/rook
ceph: remove DaemonType type
This type was a string already and was just making us doing string() calls all the time to it's not worth it. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
@@ -65,7 +65,7 @@ func NewPodSpecTester(t *testing.T, spec *v1.PodSpec) *PodSpecTester {
|
||||
// AssertVolumesMeetCephRequirements asserts that all the required Ceph volumes exist in the pod
|
||||
// spec under test, Volumes list.
|
||||
func (ps *PodSpecTester) AssertVolumesMeetCephRequirements(
|
||||
daemonType config.DaemonType, daemonID string,
|
||||
daemonType, daemonID string,
|
||||
) {
|
||||
// #nosec because of the word `Secret`
|
||||
keyringSecretName := fmt.Sprintf("rook-ceph-%s-%s-keyring", daemonType, daemonID)
|
||||
@@ -117,7 +117,7 @@ func (ps *PodSpecTester) AssertRestartPolicyAlways() {
|
||||
|
||||
// AssertChownContainer ensures that the init container to chown the Ceph data dir is present for
|
||||
// Ceph daemons.
|
||||
func (ps *PodSpecTester) AssertChownContainer(daemonType config.DaemonType) {
|
||||
func (ps *PodSpecTester) AssertChownContainer(daemonType string) {
|
||||
switch daemonType {
|
||||
case config.MonType, config.MgrType, config.OsdType, config.MdsType, config.RgwType, config.RbdMirrorType:
|
||||
assert.True(ps.t, containerExists("chown-container-data-dir", ps.spec))
|
||||
@@ -131,7 +131,7 @@ func (ps *PodSpecTester) AssertPriorityClassNameMatch(name string) {
|
||||
|
||||
// RunFullSuite runs all assertion tests for the PodSpec under test and its sub-resources.
|
||||
func (ps *PodSpecTester) RunFullSuite(
|
||||
daemonType config.DaemonType, resourceName, cephImage,
|
||||
daemonType, resourceName, cephImage,
|
||||
cpuResourceLimit, cpuResourceRequest, memoryResourceLimit, memoryResourceRequest string, priorityClassName string,
|
||||
) {
|
||||
resourceExpectations := optest.ResourceLimitExpectations{
|
||||
|
||||
Reference in New Issue
Block a user