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

feat: rewrite e2e test(upstream_chash_query_string_arg_xxx_test) with ginkgo #1504

Merged

Conversation

Jaycean
Copy link
Member

@Jaycean Jaycean commented Feb 24, 2021

Please answer these questions before submitting a pull request


New feature or improvement

  • Rewrite e2e test(upstream_chash_query_string_arg_xxx_test) with ginkgo

@Jaycean Jaycean marked this pull request as draft February 24, 2021 02:53
@codecov-io
Copy link

codecov-io commented Feb 24, 2021

Codecov Report

Merging #1504 (04c4450) into master (93e55ec) will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1504      +/-   ##
==========================================
- Coverage   69.01%   68.97%   -0.04%     
==========================================
  Files          48       48              
  Lines        3056     3056              
==========================================
- Hits         2109     2108       -1     
- Misses        707      708       +1     
  Partials      240      240              
Impacted Files Coverage Δ
api/internal/core/store/store.go 87.34% <0.00%> (-0.61%) ⬇️

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 93e55ec...04c4450. Read the comment docs.

@Jaycean Jaycean marked this pull request as ready for review February 26, 2021 12:39
assert.Nil(t, err)
resp, err := http.DefaultClient.Do(req)
assert.Nil(t, err)
respBody, err := ioutil.ReadAll(resp.Body)
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to assert the err

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

req, err := http.NewRequest("GET", url, nil)
assert.Nil(t, err)
resp, err := http.DefaultClient.Do(req)
assert.Nil(t, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Defer closing the resp.Body at here.

Copy link
Member Author

Choose a reason for hiding this comment

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

done. It's my negligence. I'll check the previous use cases and correct the same problems

} else {
res[body]++
}
resp.Body.Close()
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@Jaycean Jaycean force-pushed the rewrite_e2e_test_upstream_chash_query_string branch from 0f787ea to 1d18070 Compare March 1, 2021 10:04
@Jaycean
Copy link
Member Author

Jaycean commented Mar 1, 2021

cc @nic-chen @starsz There seems to be something wrong with CI?

@nic-chen
Copy link
Member

nic-chen commented Mar 1, 2021

cc @nic-chen @starsz There seems to be something wrong with CI?

need to wait for it..

@starsz
Copy link
Contributor

starsz commented Mar 1, 2021

cc @nic-chen @starsz There seems to be something wrong with CI?

Maybe Github is too busy.

@Jaycean Jaycean force-pushed the rewrite_e2e_test_upstream_chash_query_string branch from 1d18070 to a1709a8 Compare March 1, 2021 14:56
@Jaycean
Copy link
Member Author

Jaycean commented Mar 2, 2021

cc @starsz PTAL, Thks.

Copy link
Contributor

@starsz starsz left a comment

Choose a reason for hiding this comment

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

LGTM.

@starsz starsz merged commit a4c93e7 into apache:master Mar 2, 2021
@Jaycean Jaycean deleted the rewrite_e2e_test_upstream_chash_query_string branch March 10, 2021 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants