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

Docker files clean up and unit test coverage #425

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

santhoshatdell
Copy link
Contributor

@santhoshatdell santhoshatdell commented Jan 30, 2025

Description

  • Cleaned up unused docker files in the powerstore repository. There is only one Dockerfile now for the main build.
  • Some refactoring for k8sutils functions in how the k8s client set is created and passed.
  • Added unit tests for the missed k8sutils pkg for code coverage check.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1691

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?

Image is built successfully.

[root@master-1-SPknwwOOoaVwH csi-powerstore]# make docker
which: no gosec in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/usr/local/go/bin:/go/bin:/usr/local/go/bin:/go/bin)
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk DOCKER_FILE=Dockerfile docker
..........
Dockerfile
podman build --pull -f Dockerfile -t "dellemc/csi-powerstore:v2.13.0" --build-arg GOIMAGE=golang:1.23 --build-arg BASEIMAGE=quay.io/dell/container-storage-modules/csm-base-image:nightly .
[1/2] STEP 1/5: FROM golang:1.23 AS builder
..........
Successfully tagged localhost/dellemc/csi-powerstore:v2.13.0

donatwork
donatwork previously approved these changes Jan 30, 2025
@santhoshatdell
Copy link
Contributor Author

FAIL: coverage for package github.com/dell/csi-powerstore/v2/pkg/common/k8sutils is 0.0%, lower than 90%

I will look into this.

@santhoshatdell santhoshatdell changed the title Docker files clean up Docker files clean up and unit test coverage Feb 4, 2025
@santhoshatdell santhoshatdell merged commit 30aa32e into main Feb 6, 2025
7 checks passed
@santhoshatdell santhoshatdell deleted the cleanup-dockerfile branch February 6, 2025 15:55
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.

3 participants