-
Notifications
You must be signed in to change notification settings - Fork 198
feat: pkg-util-github-repo enhancement #911
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
Conversation
|
@jxs1211 Please check the ci error and try to resolve the conflict. Thanks! |
d255832 to
91d7fd6
Compare
@iyear the conflicts have been resolved. But the ci error haven't yet, I find the output of the error: Running Suite: GitHub Suite - /home/runner/work/devstream/devstream/pkg/util/github
===================================================================================
Random Seed: 1658982331
Will run 38 of 38 specs
••••••<nil>
••••••••••••••••••••2022-07-28 04:25:31 ℹ [INFO] Prepare to create an organization repository: or/r
•2022-07-28 04:25:31 ℹ [INFO] Prepare to create an organization repository: or/r
•2022-07-28 04:25:31 ℹ [INFO] r%!(EXTRA string=mb)
Error: -28 04:25:31 !! [ERROR] Failed to create repo: POST http://127.0.0.1:37449/api-v3/user/repos: 404 [].
•2022-07-28 04:25:31 ℹ [INFO] r%!(EXTRA string=mb)
2022-07-28 04:25:31 ℹ [INFO] Prepare to create an organization repository: or/r
2022-07-28 04:25:31 ℹ [INFO] The repo r has been created.
•2022-07-28 04:25:31 ℹ [INFO] r%!(EXTRA string=mb)
2022-07-28 04:25:31 ℹ [INFO] Prepare to create an organization repository: or/r
2022-07-28 04:25:31 ℹ [INFO] The repo r has been created.
•••2022-07-28 04:25:31 ℹ [INFO] GitHub repo was not found. Nothing to do here.
•2022-07-28 04:25:31 ✔ [SUCCESS] GitHub repo r removed.
•••panic: test timed out after 10m0s
goroutine 170 [running]:
testing.(*M).startAlarm.func1()
/opt/hostedtoolcache/go/1.18.4/x64/src/testing/testing.go:2029 +0x8e
created by time.goFunc
/opt/hostedtoolcache/go/1.18.4/x64/src/time/sleep.go:176 +0x32I noticed that the test time out was set to 10m which is supposed not to raise this timeout error, I've verified the test will pass successfully by setting the timeout to 10m\10s in my local environment. Only one condition can reproduce the error by setting the time out to 1s below: [going@dev github]$ go test -run=TestPlanmanager -cover -coverprofile=./coverage.out -timeout=1s -v
=== RUN TestPlanmanager
Running Suite: GitHub Suite - /d/work/src/go/open_source/devstream/pkg/util/github
==================================================================================
Random Seed: 1658985340
Will run 38 of 38 specs
•••••2022-07-28 13:15:40 ℹ [INFO] Prepare to create an organization repository: or/r
•2022-07-28 13:15:40 ℹ [INFO] Prepare to create an organization repository: or/r
•2022-07-28 13:15:40 ℹ [INFO] r%!(EXTRA string=mb)
2022-07-28 13:15:40 !! [ERROR] Failed to create repo: POST http://127.0.0.1:37331/api-v3/user/repos: 404 [].
•2022-07-28 13:15:40 ℹ [INFO] r%!(EXTRA string=mb)
2022-07-28 13:15:40 ℹ [INFO] Prepare to create an organization repository: or/r
2022-07-28 13:15:40 ℹ [INFO] The repo r has been created.
•2022-07-28 13:15:40 ℹ [INFO] r%!(EXTRA string=mb)
2022-07-28 13:15:40 ℹ [INFO] Prepare to create an organization repository: or/r
2022-07-28 13:15:40 ℹ [INFO] The repo r has been created.
•••2022-07-28 13:15:40 ℹ [INFO] GitHub repo was not found. Nothing to do here.
•2022-07-28 13:15:40 ✔ [SUCCESS] GitHub repo r removed.
••••••••••••••••••••••<nil>
•coverage: 55.9% of statements
panic: test timed out after 1s
goroutine 173 [running]:
testing.(*M).startAlarm.func1()
/home/going/go/go1.18.3/src/testing/testing.go:2029 +0x8eso I'm a little bit confused why this error could happened, or there is something I missed? |
91d7fd6 to
7905694
Compare
Signed-off-by: xian-jie.shen <327411586@qq.com>
7905694 to
090365e
Compare
iyear
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Signed-off-by: xian-jie.shen 327411586@qq.com
Pre-Checklist
Note: please complete ALL items in the following checklist.
Description
add ut for repo
Related Issues
see #833 for the details
New Behavior (screenshots if needed)