Skip to content
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

chore: introduce ginkgo framework for backend E2E testing #1319

Merged
merged 28 commits into from
Feb 5, 2021

Conversation

nic-chen
Copy link
Member

@nic-chen nic-chen commented Jan 17, 2021

Please answer these questions before submitting a pull request

  • Why submit this pull request?
  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Testcase

introduce ginkgo framework to backend E2E testing, for better test result displaying and better practice.

@codecov-io
Copy link

codecov-io commented Jan 17, 2021

Codecov Report

Merging #1319 (14ad3e8) into master (352a64d) will decrease coverage by 19.97%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1319       +/-   ##
===========================================
- Coverage   67.99%   48.01%   -19.98%     
===========================================
  Files          48       39        -9     
  Lines        3031     2601      -430     
===========================================
- Hits         2061     1249      -812     
- Misses        727     1177      +450     
+ Partials      243      175       -68     
Impacted Files Coverage Δ
api/internal/utils/version.go 0.00% <0.00%> (-100.00%) ⬇️
api/internal/filter/request_id.go 0.00% <0.00%> (-100.00%) ⬇️
api/internal/core/entity/entity.go 0.00% <0.00%> (-100.00%) ⬇️
api/internal/core/store/storehub.go 0.00% <0.00%> (-70.41%) ⬇️
api/internal/filter/cors.go 0.00% <0.00%> (-66.67%) ⬇️
api/internal/filter/schema.go 0.00% <0.00%> (-55.47%) ⬇️
api/internal/handler/upstream/upstream.go 28.81% <0.00%> (-54.24%) ⬇️
api/internal/utils/consts/api_error.go 0.00% <0.00%> (-50.00%) ⬇️
api/internal/handler/data_loader/route_import.go 27.41% <0.00%> (-37.50%) ⬇️
api/internal/handler/server_info/server_info.go 57.14% <0.00%> (-33.34%) ⬇️
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 352a64d...14ad3e8. Read the comment docs.

@juzhiyuan
Copy link
Member

any update?

@nic-chen nic-chen marked this pull request as ready for review February 3, 2021 02:02
@idbeta
Copy link
Contributor

idbeta commented Feb 3, 2021

@nic-chen Can you provide us with what will be the output when the case fails in the new framework? Is it more convenient to locate the reason?

ping @nic-chen any example?

api/test/e2enew/base/base.go Outdated Show resolved Hide resolved
api/test/e2enew/base/base.go Outdated Show resolved Hide resolved
api/test/e2enew/base/base.go Outdated Show resolved Hide resolved
Copy link
Member

@membphis membphis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we start with a small step?

big PR

.github/workflows/backend-e2e-test.yml Outdated Show resolved Hide resolved
@@ -0,0 +1,136 @@
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please confirm the license

@starsz starsz requested a review from tokers February 5, 2021 03:23
@nic-chen
Copy link
Member Author

nic-chen commented Feb 5, 2021

@membphis license check result:

github.com/yudai/gojsondiff,https://github.com/yudai/gojsondiff/blob/master/LICENSE,MIT
github.com/nxadm/tail,https://github.com/nxadm/tail/blob/master/LICENSE,MIT
github.com/gavv/httpexpect/v2,https://github.com/gavv/httpexpect/blob/master/v2/LICENSE,MIT
github.com/fsnotify/fsnotify,https://github.com/fsnotify/fsnotify/blob/master/LICENSE,BSD-3-Clause
github.com/imkira/go-interpol,https://github.com/imkira/go-interpol/blob/master/LICENSE,MIT
github.com/klauspost/compress,https://github.com/klauspost/compress/blob/master/LICENSE,BSD-3-Clause
github.com/yalp/jsonpath,https://github.com/yalp/jsonpath/blob/master/LICENSE,BSD-3-Clause
github.com/sergi/go-diff/diffmatchpatch,https://github.com/sergi/go-diff/blob/master/diffmatchpatch/LICENSE,MIT
golang.org/x/net/publicsuffix,Unknown,BSD-3-Clause
github.com/nxadm/tail/ratelimiter,https://github.com/nxadm/tail/blob/master/ratelimiter/Licence,MIT
golang.org/x/sys,Unknown,BSD-3-Clause
github.com/gorilla/websocket,https://github.com/gorilla/websocket/blob/master/LICENSE,BSD-2-Clause
github.com/pmezard/go-difflib/difflib,https://github.com/pmezard/go-difflib/blob/master/difflib/LICENSE,BSD-3-Clause
github.com/xeipuuv/gojsonschema,Unknown,Apache-2.0
github.com/xeipuuv/gojsonreference,Unknown,Apache-2.0
github.com/xeipuuv/gojsonpointer,Unknown,Apache-2.0
moul.io/http2curl,Unknown,Apache-2.0
github.com/fatih/structs,https://github.com/fatih/structs/blob/master/LICENSE,MIT
gopkg.in/yaml.v2,Unknown,Apache-2.0
github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable,https://github.com/onsi/ginkgo/blob/master/reporters/stenographer/support/go-colorable/LICENSE,MIT
github.com/tidwall/gjson,https://github.com/tidwall/gjson/blob/master/LICENSE,MIT
github.com/ajg/form,https://github.com/ajg/form/blob/master/LICENSE,BSD-3-Clause
github.com/yudai/golcs,https://github.com/yudai/golcs/blob/master/LICENSE,MIT
github.com/valyala/fasthttp,https://github.com/valyala/fasthttp/blob/master/LICENSE,MIT
github.com/stretchr/testify,https://github.com/stretchr/testify/blob/master/LICENSE,MIT
github.com/davecgh/go-spew/spew,https://github.com/davecgh/go-spew/blob/master/spew/LICENSE,ISC
github.com/valyala/bytebufferpool,https://github.com/valyala/bytebufferpool/blob/master/LICENSE,MIT
github.com/onsi/ginkgo,https://github.com/onsi/ginkgo/blob/master/LICENSE,MIT
gopkg.in/tomb.v1,Unknown,BSD-3-Clause
github.com/tidwall/pretty,https://github.com/tidwall/pretty/blob/master/LICENSE,MIT
github.com/google/go-querystring/query,https://github.com/google/go-querystring/blob/master/query/LICENSE,BSD-3-Clause
github.com/tidwall/match,https://github.com/tidwall/match/blob/master/LICENSE,MIT
github.com/klauspost/cpuid,https://github.com/klauspost/cpuid/blob/master/LICENSE,MIT

@nic-chen nic-chen requested a review from gxthrj February 5, 2021 13:51
@juzhiyuan juzhiyuan merged commit 9bd3a54 into apache:master Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants