Files
kserve/coverage.sh
Andrews ArokiamandGitHub e3c5e7f179 Code coverage (#2351)
* # This is a combination of 6 commits.
# This is the 1st commit message:

Modify agent test case for code coverage (#1849)

* Modifies the test case for sync models config

Signed-off-by: Andrews Arokiam <[email protected]>

# This is the commit message #2:

Add test cases for agent storage utils (#1849)

* Add test case for FileExists function
* Add test case for RemoveDir function

Signed-off-by: Andrews Arokiam <[email protected]>

# This is the commit message #3:

Add test case for agent storage utils

* Add test case for GetProvider function

Signed-off-by: Andrews Arokiam <[email protected]>

# This is the commit message #4:

Add test case for gcs model downloader (#1849)

* Add test case for gcs model downloader in agent

Signed-off-by: Andrews Arokiam <[email protected]>

# This is the commit message #5:

Add test cases for agent downloader

Signed-off-by: Andrews Arokiam <[email protected]>

# This is the commit message #6:

Add test cases for configmap (#1849)

* Add test cases for v1beta1 configmap

Signed-off-by: Andrews Arokiam <[email protected]>

* Add test cases for inference service defaults (#1849)

* Add test cases for all model runtimes
* Add test cases for all runtime defaults

Signed-off-by: Andrews Arokiam <[email protected]>

* fmt (#1849)

Signed-off-by: Andrews Arokiam <[email protected]>

* Modify agent test case for code coverage (#1849)

* Modifies the test case for sync models config

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for agent storage utils (#1849)

* Add test case for FileExists function
* Add test case for RemoveDir function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test case for agent storage utils

* Add test case for GetProvider function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test case for gcs model downloader (#1849)

* Add test case for gcs model downloader in agent

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for agent downloader

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for configmap (#1849)

* Add test cases for v1beta1 configmap

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for inference service defaults (#1849)

* Add test cases for all model runtimes
* Add test cases for all runtime defaults

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for predictor model (#1849)

* Add test cases for isFrameworkSupported function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for sklearn predictor (#1849)

* Add test cases for GetProtocol function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for configmap (#1849)

* Add test case for creating empty model config

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for utils (#1849)

* Add test cases for IncludesArg function
* Add test cases for IsGPUEnabled function
* Add test cases for FirstNonNilError function
* Add test cases for RemoveString function
* Add test cases for IsPrefixSupported function

Signed-off-by: Andrews Arokiam <[email protected]>

* Add test cases for creds_utils (#1849)

* Add test cases for set_gcs_credentials function
* Add test cases for create_secret function
* Add test cases for set_service_account function
* Add test cases for create_service_account function
* Add test cases for patch_service_account function
* Add test cases for get_creds_name_from_config_map function

Signed-off-by: Andrews Arokiam <[email protected]>

* Add test cases for creds_utils (#1849)

* Add test cases for set_gcs_credentials function
* Add test cases for create_secret function
* Add test cases for set_service_account function
* Add test cases for create_service_account function
* Add test cases for patch_service_account function
* Add test cases for get_creds_name_from_config_map function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for creds_utils (#1849)

* Add test cases for set_s3_credentials function
* Add test cases for set_azure_credentials function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for v1beta1 component (#1849)

* Add test cases for validateStorageSpec function
* Add test cases for validateLogger function
* Add test cases for FirstNonNilComponent function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for inference service status (#1849)

* Add test cases for PropagateRawStatus function
* Add test cases for PropagateStatus function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for predictor (#1849)

* Add test cases for GetPredictorImplementations function
* Add test cases for GetPredictorImplementation function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for agent_injector (#1849)

* Add test cases for getLoggerConfigs function
* Add test cases for getAgentConfigs function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for batcher_injector (#1849)

* Add test cases for getBatcherConfigs function

Signed-off-by: Andrews Arokiam <[email protected]>

* Add test cases for storage initializer injector (#1849)

* Add test cases for getStorageInitializerConfigs function
* Add test cases for parsePvcUri function

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for storage initializer injector (#1849)

* Add test cases for parsePvcUri function

Signed-off-by: Andrews Arokiam <[email protected]>

fmt (#1849)

Signed-off-by: Andrews Arokiam <[email protected]>

Add test cases for controller utils (#1849)

* Add test cases for GetDeploymentMode function

Signed-off-by: Andrews Arokiam <[email protected]>

Remove double import of same package (#1849)

Signed-off-by: Andrews Arokiam <[email protected]>

temp commit

Signed-off-by: Andrews Arokiam <[email protected]>

Updated coverage for inference_service_default_test

Signed-off-by: Andrews Arokiam <[email protected]>

Added scripts for code coverage

Signed-off-by: Andrews Arokiam <[email protected]>

Updated make to track coverage including subpackages

Added more coverage

Added ignore to client package - generated code
Added coverage script to workflow

Signed-off-by: Andrews Arokiam <[email protected]>

* Temporarily commenting couple of test cases

Signed-off-by: Andrews Arokiam <[email protected]>

Temporary changes to debug e2e

Signed-off-by: Andrews Arokiam <[email protected]>

Commented configmap test
Reverted accidental commit of generated code.

Signed-off-by: Andrews Arokiam <[email protected]>

Added -v to debug failing tests

Signed-off-by: Andrews Arokiam <[email protected]>

Updated tests to remove dependency on k8s cluster

Signed-off-by: Andrews Arokiam <[email protected]>

* Updated readme to show coverage
2022-10-12 21:14:31 -04:00

10 lines
167 B
Bash
Executable File

#!/bin/sh
while read p || [ -n "$p" ]
do
sed -i "/${p}/d" ./coverage.out
done < ./.cov-ignore
go tool cover -func coverage.out > coverage.cov
tail -1 coverage.cov