Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
Hi, I am very honored to participate in Kubevela. This is my first contribution. This PR has added some unit tests.
π€ Generated by Copilot at 889a6e9
Summary
π§ͺπ οΈπ
This pull request fixes some compile errors and adds new test functions for various utility packages. It improves the test coverage and quality of the
pkg/utils/schema
,pkg/utils/system
,pkg/utils/url
,pkg/utils/file
, andpkg/utils/strings
packages. It also tests the validation of UI schemas for thepkg/utils/schema
package.Walkthrough
utils
package (link, link, link)IsJSONYAMLorCUEFile
function, which checks file extensions (link)StringsContain
function, which checks string slices (link)IsValidURL
function, which checks URL validity (link)schema
package (link)Validate
method of theUISchema
type, which validates UI schema conditions and actions (link)system
package (link)GetVelaHomeDir
function, which returns the vela home directory (link)utils
,schema
, andsystem
packages (link, link, link)Fixes #
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Special notes for your reviewer