Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(cspc): add cspc tunables test #150

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

sonasingh46
Copy link
Contributor

@sonasingh46 sonasingh46 commented Aug 6, 2020

This PR adds tuneable tests that are passed via CSPC mentioned in #111
Following is the output :

Running Suite: CSPC Integration Tests
=====================================
Random Seed: 1596745849
Will run 15 of 15 specs

I0807 02:00:57.972153   11408 cache.go:57] Building CSPC Resource Cache...
CSPC stripe CSPC Pass resource and limit via CSPC 
  creating the cspc,no error should be returned
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:422
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Expected number of CSPI should be created
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:452

• [SLOW TEST:6.013 seconds]
CSPC
/home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:60
  stripe CSPC
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:420
    Pass resource and limit via CSPC
    /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:421
      Expected number of CSPI should be created
      /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:452
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Expected number of pool manager deployments should be created
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:459
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Resource limits should be passed to the CSPI
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:466
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Resource limits should be passed to the cstor-pool container
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:472
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Tolerations should be passed to the CSPI
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:478
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Tolerations should be passed to the pool manager deployments
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:484
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Priority class should be passed to the CSPI
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:490
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Priority class should be passed to the pool manager deployments
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:496
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  Compression should be passed to the CSPI
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:502
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC 
  RO threshold should be passed to the CSPI
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:508
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC Deleting the cspc 
  No error should be returned
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:516
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC Deleting the cspc 
  No corresponding cspi(s) should be present
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:528
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC Deleting the cspc 
  No corresponding pool-manger deployments should be present
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:535
•
------------------------------
CSPC stripe CSPC Pass resource and limit via CSPC Deleting the cspc 
  the bdc(s) created by cstor-operator should get deleted
  /home/k8s/go_projects/src/openebs/cstor-operators/tests/cspc/provisioning/provisioning_test.go:542
•
Ran 15 of 15 Specs in 9.203 seconds
SUCCESS! -- 15 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Running Suite: CSPC Integration Tests
=====================================
Random Seed: 1596745849
Will run 0 of 0 specs

I0807 02:01:07.186260   11495 cache.go:57] Building CSPC Resource Cache...

Ran 0 of 0 Specs in 0.091 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 2 suites in 17.599335352s
Test Suite Passed

Signed-off-by: Ashutosh Kumar ashutosh.kumar@mayadata.io

Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
Copy link
Contributor

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes are good

priorityClassMatches := true
pmList := client.GetPoolManagerList(cspcName, cspcNamespace)
for _, pm := range pmList.Items {
if !reflect.DeepEqual(pm.Spec.Template.Spec.PriorityClassName, *priorityClass) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make use of == operator? instead of reflect.DeeqEqual?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just kept like this for consistency. Are there any concerns?

client.HasROThresholdOnCSPIEventually(cspc.Name, cspc.Namespace, &roThreshold)
Expect(resoureLimitMatches).To(BeTrue())
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Shold we need to add test cases by removing reconciliation that was added and verifying whether they were reflected on the pool manager?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do in the next PRs.

Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@prateekpandey14 prateekpandey14 merged commit 13835aa into openebs-archive:master Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants