You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/04 03:23:23 UTC
[GitHub] [apisix-dashboard] Jaycean opened a new pull request #1423: chore: add ssl PATCH method unit test
Jaycean opened a new pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [ ] Bugfix
- [ ] New feature provided
- [ ] Improve performance
- [ ] Backport patches
- Related issues
#1332
___
- add ssl PATCH method unit test
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773025013
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=h1) Report
> Merging [#1423](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=desc) (b04e5ad) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/0a0a42ae1c81f21a03c98a991b707dba6b724364?el=desc) (0a0a42a) will **increase** coverage by `0.27%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1423 +/- ##
==========================================
+ Coverage 66.59% 66.87% +0.27%
==========================================
Files 44 44
Lines 2937 2937
==========================================
+ Hits 1956 1964 +8
+ Misses 744 733 -11
- Partials 237 240 +3
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `33.33% <0.00%> (ø)` | |
| [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv) | `48.48% <0.00%> (+4.04%)` | :arrow_up: |
| [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `60.29% <0.00%> (+5.88%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=footer). Last update [0a0a42a...b04e5ad](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean closed pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean closed pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean closed pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean closed pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773025013
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=h1) Report
> Merging [#1423](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=desc) (b04e5ad) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/0a0a42ae1c81f21a03c98a991b707dba6b724364?el=desc) (0a0a42a) will **decrease** coverage by `21.01%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1423 +/- ##
===========================================
- Coverage 66.59% 45.58% -21.02%
===========================================
Files 44 35 -9
Lines 2937 2516 -421
===========================================
- Hits 1956 1147 -809
- Misses 744 1200 +456
+ Partials 237 169 -68
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-70.41%)` | :arrow_down: |
| [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
| [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `28.81% <0.00%> (-54.24%)` | :arrow_down: |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
| [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `57.14% <0.00%> (-33.34%)` | :arrow_down: |
| [api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==) | `0.00% <0.00%> (-33.34%)` | :arrow_down: |
| ... and [30 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1423/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=footer). Last update [0a0a42a...b04e5ad](https://codecov.io/gh/apache/apisix-dashboard/pull/1423?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773784025
This PR is closed first, and then re open a new pr.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773119877
waiting for #1426
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773780729
ping @starsz
Hi, I was adding the unit test of patch method before, but I see that you are refactoring the unit test. Have you started the unit test of SSL? If it has started, my PR is also closed. If it has not started, I can help with the refactoring of SSL unit test.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#discussion_r569931288
##########
File path: api/internal/handler/ssl/ssl_test.go
##########
@@ -162,3 +163,199 @@ func TestSSL(t *testing.T) {
_, err = handler.BatchDelete(ctx)
assert.Nil(t, err)
}
+
+func TestSSL_Patch_Method(t *testing.T) {
+ // init
+ err := storage.InitETCDClient(conf.ETCDConfig)
+ assert.Nil(t, err)
+ err = store.InitStores()
+ assert.Nil(t, err)
+
+ handler := &Handler{
+ sslStore: store.GetStore(store.HubKeySsl),
+ }
+ assert.NotNil(t, handler)
+
+ //create
+ ctx := droplet.NewContext()
+ ssl := &entity.SSL{}
+ reqBody := `{
+ "id":"1",
+ "key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh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FjAKfI2Wv3i+zvJ1mAHM3u1jcX3zxOxSAN4LJVBudgkGpop1ps\nW5tWveXiXwxCUE/r9ax4mfJvXQ==\n-----END PRIVATE KEY-----",
Review comment:
these test data could put into a file in dir `testdata` , this make the code look clearer
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
starsz commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773782762
> ping @starsz
> Hi, I was adding the unit test of patch method before, but I see that you are refactoring the unit test. Have you started the unit test of SSL? If it has started, my PR is also closed. If it has not started, I can help with the refactoring of SSL unit test.
Pretty good. I haven't started refactoring SSL unit test. I need your help 😄.
Thank you very much.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] starsz commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
starsz commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773782762
> ping @starsz
> Hi, I was adding the unit test of patch method before, but I see that you are refactoring the unit test. Have you started the unit test of SSL? If it has started, my PR is also closed. If it has not started, I can help with the refactoring of SSL unit test.
Pretty good. I haven't started refactoring SSL unit test. I need your help 😄.
Thank you very much.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773119877
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773165757
may sync the latest codes to fix E2E failed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773783342
> > ping @starsz
> > Hi, I was adding the unit test of patch method before, but I see that you are refactoring the unit test. Have you started the unit test of SSL? If it has started, my PR is also closed. If it has not started, I can help with the refactoring of SSL unit test.
>
> Pretty good. I haven't started refactoring SSL unit test. I need your help .
> Thank you very much.
OK, I'll change the name of PR and refactor SSL directly. I'll discuss with you to avoid our repeated work.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773212756
> may sync the latest codes to fix E2E failed.
no problem.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean commented on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean commented on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773212756
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean edited a comment on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean edited a comment on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773783342
> > ping @starsz
> > Hi, I was adding the unit test of patch method before, but I see that you are refactoring the unit test. Have you started the unit test of SSL? If it has started, my PR is also closed. If it has not started, I can help with the refactoring of SSL unit test.
>
> Pretty good. I haven't started refactoring SSL unit test. I need your help .
> Thank you very much.
OK, I'll discuss with you to avoid our repeated work.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Jaycean edited a comment on pull request #1423: chore: add ssl PATCH method unit test
Posted by GitBox <gi...@apache.org>.
Jaycean edited a comment on pull request #1423:
URL: https://github.com/apache/apisix-dashboard/pull/1423#issuecomment-773783342
> > ping @starsz
> > Hi, I was adding the unit test of patch method before, but I see that you are refactoring the unit test. Have you started the unit test of SSL? If it has started, my PR is also closed. If it has not started, I can help with the refactoring of SSL unit test.
>
> Pretty good. I haven't started refactoring SSL unit test. I need your help .
> Thank you very much.
OK, I'll discuss with you to avoid our repeated work.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org