add ut for pkg/util/annotation #20
Open
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.
Signed-off-by: xian-jie.shen [email protected]
Pre-Checklist
Description
add ut
New Behavior (screenshots if needed)
[root@dev testing]# go test annotation_test.go annotation.go -v -cover === RUN TestGetRegion === RUN TestGetRegion/base === RUN TestGetRegion/LabelZoneRegion === RUN TestGetRegion/not_found --- PASS: TestGetRegion (0.00s) --- PASS: TestGetRegion/base (0.00s) --- PASS: TestGetRegion/LabelZoneRegion (0.00s) --- PASS: TestGetRegion/not_found (0.00s) === RUN TestGetZone === RUN TestGetZone/base === RUN TestGetZone/LabelZoneFailureDomain === RUN TestGetZone/not_found --- PASS: TestGetZone (0.00s) --- PASS: TestGetZone/base (0.00s) --- PASS: TestGetZone/LabelZoneFailureDomain (0.00s) --- PASS: TestGetZone/not_found (0.00s) === RUN TestGetInstanceType === RUN TestGetInstanceType/base === RUN TestGetInstanceType/LabelInstanceTypeStable === RUN TestGetInstanceType/not_found --- PASS: TestGetInstanceType (0.00s) --- PASS: TestGetInstanceType/base (0.00s) --- PASS: TestGetInstanceType/LabelInstanceTypeStable (0.00s) --- PASS: TestGetInstanceType/not_found (0.00s) === RUN TestGetOperatingSystem === RUN TestGetOperatingSystem/base === RUN TestGetOperatingSystem/betaLabel === RUN TestGetOperatingSystem/not_found --- PASS: TestGetOperatingSystem (0.00s) --- PASS: TestGetOperatingSystem/base (0.00s) --- PASS: TestGetOperatingSystem/betaLabel (0.00s) --- PASS: TestGetOperatingSystem/not_found (0.00s) PASS coverage: 100.0% of statements ok command-line-arguments 0.010s coverage: 100.0% of statements