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

NVMe Command constant needs to use full path and UT coverage #55

Merged
merged 7 commits into from
Nov 22, 2024

Conversation

karthikk92
Copy link
Contributor

@karthikk92 karthikk92 commented Nov 21, 2024

Description

The PR contains the below changes

  • NVMeCommand constant needs to use full path
  • Unit tests added to increase the code coverage above 80%

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1549

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Built the powerstore image pulling the latest changes and sanity run, and tests are passing.
[root@ cert-csi]# ./cert-csi test scaling --sc powerstore
[2024-11-21 06:33:17] INFO Starting cert-csi; ver. 1.6.0
[2024-11-21 06:33:17] INFO Using EVENT observer type
[2024-11-21 06:33:17] INFO Using config from /etc/kubernetes/admin.conf
[2024-11-21 06:33:17] INFO Successfully loaded config. Host: https://X.X.X.X:6443
[2024-11-21 06:33:17] INFO Created new KubeClient
[2024-11-21 06:33:17] INFO Running 1 iteration(s)
[2024-11-21 06:33:17] INFO *** ITERATION NUMBER 1 ***
[2024-11-21 06:33:17] INFO Starting ScalingSuite with powerstore storage class
[2024-11-21 06:33:17] INFO Successfully created namespace scale-test-5ae9a3bb
[2024-11-21 06:33:17] INFO Using default volume size 3Gi
[2024-11-21 06:33:17] INFO Using default image: quay.io/centos/centos:latest
[2024-11-21 06:33:17] INFO Created stateful set sts-scale-test68np7
[2024-11-21 06:33:17] INFO Waiting for sts pods to become ready
[2024-11-21 06:33:27] INFO Scaling to 5 replicas
[2024-11-21 06:33:27] INFO Waiting for sts pods to become ready
[2024-11-21 06:34:01] INFO Scaling to 0 replicas
[2024-11-21 06:34:01] INFO Waiting for sts pods to become ready
[2024-11-21 06:34:03] INFO Deleting all resources in namespace scale-test-5ae9a3bb
[2024-11-21 06:35:06] INFO Namespace scale-test-5ae9a3bb was deleted in 1m2.761504512s
[2024-11-21 06:35:07] INFO SUCCESS: ScalingSuite in 1m50.080913067s
[2024-11-21 06:35:07] INFO Started generating reports...
Collecting metrics
1 / 1 [----------------------------------------------------------------------------------------------------] 100.00% ? p/s[2024-11-21 06:35:07] INFO Started generating reports...
Collecting metrics
1 / 1 [----------------------------------------------------------------------------------------------------] 100.00% ? p/sGenerating plots
1 / 1 [----------------------------------------------------------------------------------------------------] 100.00% ? p/s[2024-11-21 06:35:07] WARN No ResourceUsageMetrics provided
[2024-11-21 06:35:07] ERROR no ResourceUsageMetrics provided
report-test-run-f57749d9:
Name: test-run-f57749d9
Host: https://10.x.x.x:6443
StorageClass: powerstore
Minimum and Maximum EntityOverTime charts:

/root/.cert-csi/reports/test-run-f57749d9/PodsCreatingOverTime.png

/root/.cert-csi/reports/test-run-f57749d9/PodsReadyOverTime.png

/root/.cert-csi/reports/test-run-f57749d9/PodsTerminatingOverTime.png

/root/.cert-csi/reports/test-run-f57749d9/PvcsCreatingOverTime.png

/root/.cert-csi/reports/test-run-f57749d9/PvcsBoundOverTime.png

Tests:

  1. TestCase: ScalingSuite
    Started: 2024-11-21 06:33:17.28866488 +0000 UTC
    Ended: 2024-11-21 06:35:07.369374214 +0000 UTC
    Result: SUCCESS

         Stage metrics:
                 PVCAttachment:
                     Avg: 11.122264945s
                     Min: 2.203834177s
                     Max: 18.315703549s
                     Histogram:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCAttachment.png
                     BoxPlot:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCAttachment_boxplot.png
                 PVCBind:
                     Avg: 6.601522997s
                     Min: 687.94461ms
                     Max: 11.953379575s
                     Histogram:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCBind.png
                     BoxPlot:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCBind_boxplot.png
                 PVCCreation:
                     Avg: 20.689414693s
                     Min: 5.380588423s
                     Max: 30.885137696s
                     Histogram:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCCreation.png
                     BoxPlot:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCCreation_boxplot.png
                 PVCDeletion:
                     Avg: 1.189982465s
                     Min: 16.819411ms
                     Max: 3.313582897s
                     Histogram:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCDeletion.png
                     BoxPlot:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCDeletion_boxplot.png
                 PVCUnattachment:
                     Avg: 8.291617937s
                     Min: 549.746206ms
                     Max: 16.798273442s
                     Histogram:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCUnattachment.png
                     BoxPlot:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PVCUnattachment_boxplot.png
                 PodCreation:
                     Avg: 23.73764673s
                     Min: 8.428755469s
                     Max: 32.15308464s
                     Histogram:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PodCreation.png
                     BoxPlot:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PodCreation_boxplot.png
                 PodDeletion:
                     Avg: 1.478875431s
                     Min: 857.031716ms
                     Max: 1.862356447s
                     Histogram:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PodDeletion.png
                     BoxPlot:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/PodDeletion_boxplot.png
                     EntityNumberOverTime:
     /root/.cert-csi/reports/test-run-f57749d9/ScalingSuite8/EntityNumberOverTime.png
    

[2024-11-21 06:35:07] INFO Avg time of a run: 46.05s
[2024-11-21 06:35:07] INFO Avg time of a del: 62.76s
[2024-11-21 06:35:07] INFO Avg time of all: 110.08s
[2024-11-21 06:35:07] INFO During this run 100.0% of suites succeeded
[root@ cert-csi]#

@adarsh-dell
Copy link
Contributor

@karthikk92,

The checks are failing, and I noticed that some files have incorrect copyright years. For example, certain files are marked with 2022 even though they were introduced in 2024. Additionally, there is some commented code in the files—could you confirm if this commented code is necessary, or can it be removed?

Thanks

@karthikk92
Copy link
Contributor Author

@karthikk92,

The checks are failing, and I noticed that some files have incorrect copyright years. For example, certain files are marked with 2022 even though they were introduced in 2024. Additionally, there is some commented code in the files—could you confirm if this commented code is necessary, or can it be removed?

Thanks

copy right taken care, commented code removed and checks are passing

@karthikk92 karthikk92 merged commit 5dbae9e into main Nov 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants