-
Notifications
You must be signed in to change notification settings - Fork 10
feat(test reports): test_report key functionality #634
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
Closed
Closed
Changes from 28 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
aad77ed
test report execution logic
802831e
fix(int): fix int types
e7a30eb
Merge branch 'fix_int_types' into feat_test_report_1
309d53a
changes
aeb5c30
chore(urfave cli): bump to v3
KellyMerrick e2749c2
converting some of the flags
KellyMerrick aa3edbf
Merge branch 'fix_int_types' of github.com:go-vela/worker into bump-u…
KellyMerrick 86a2d9b
more v3
KellyMerrick f022c7a
more changes to v3
4a522db
Merge branch 'bump-urfave-v3' into feat_test_report_1
060aceb
chore(deps): update server to current main
KellyMerrick e2ec2b9
Merge branch 'bump-urfave-v3' into feat_test_report_1
a52952d
point to latest sdk-go
ec9dafa
add back missing code
6d37f5a
Merge branch 'main' into feat_test_report_1
timhuynh94 f42e676
add back missing code
76529b1
upload with build number
012d17e
fix(test reports): use build number instead of build id
KellyMerrick c26d850
feat(test reports): try testreport add db record
KellyMerrick 7886bd1
Merge branch 'main' into feat_test_report_1
timhuynh94 e7fa8e6
Merge branch 'main' into feat_test_report_1
timhuynh94 9e63c7b
update docker package
b85a4c6
Merge branch 'main' into feat_test_report_1
timhuynh94 54eccc6
refactor code
02bc917
add testattachment
a3300f5
Merge branch 'main' into feat_test_report_1
timhuynh94 9c829e5
make clean
746ba27
point to sdk go branch
c0affe8
Merge branch 'main' into feat_test_report_1
timhuynh94 788af04
gomod tidy
085a207
fixing linters
e9a7ced
Potential fix for code scanning alert no. 5: Clear-text logging of se…
timhuynh94 fe11078
add and fix tests
14d8645
golanci run fix
ee65782
Merge branch 'main' into feat_test_report_1
timhuynh94 5e08770
point to server branch
319412f
non working code
2b63a1c
non working code
4bfe330
working but skip step
0fe9168
working with enabled
419a687
working with enabled
605d9a4
fix skip test
76efee5
point to server branch
3991c62
update for presigned url
6b3ef9a
fix conflicts
9a6b314
fix liniting
46db70b
enhance: use context for API calls and refresh install token
ecrupper bcdc2b4
restore some defaults
ecrupper 8a358d7
linter
ecrupper 8c8d2bc
feat(test attachments): merge in main
KellyMerrick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package linux | ||
|
|
||
| import ( | ||
| "fmt" | ||
|
|
||
| api "github.com/go-vela/server/api/types" | ||
| ) | ||
|
|
||
| // CreateTestReport creates a test report record in the database for the current build. | ||
| func (c *client) CreateTestReport() (*api.TestReport, error) { | ||
| // create empty test report for the build | ||
| testReport := &api.TestReport{} | ||
|
|
||
| // update test report in database | ||
| tr, resp, err := c.Vela.TestReport.Update( | ||
| c.build.GetRepo().GetOrg(), | ||
| c.build.GetRepo().GetName(), | ||
| c.build.GetNumber(), | ||
| testReport, | ||
| ) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("failed to create test report record: build=%d, status=%d, error=%w", | ||
| c.build.GetNumber(), resp.StatusCode, err) | ||
| } | ||
|
|
||
| c.Logger.Debugf("created test report record: id=%d, build=%d", tr.GetID(), c.build.GetNumber()) | ||
|
|
||
| return tr, nil | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.