Skip to content

Docker files clean up and unit test coverage#425

Merged
santhoshatdell merged 6 commits into
mainfrom
cleanup-dockerfile
Feb 6, 2025
Merged

Docker files clean up and unit test coverage#425
santhoshatdell merged 6 commits into
mainfrom
cleanup-dockerfile

Conversation

@santhoshatdell

@santhoshatdell santhoshatdell commented Jan 30, 2025

Copy link
Copy Markdown
Contributor

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 #
https://github.com/dell/csm/issues/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
Copy Markdown
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
@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