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

Tests: Support e2e-go tests when repo is not installed in GOPATH. #3949

Conversation

winder
Copy link
Contributor

@winder winder commented May 3, 2022

Summary

Running e2e go tests fails when the repo is not cloned inside the GOPATH. This change looks up the current directory using runtime.Caller as an alternative to hard coding the GOPATH location.

note: the Makefile also solves this problem by setting the TESTDATADIR environment variable, but that doesn't work when running tests from an IDE.

Test Plan

Existing tests cover this code path. Additionally I manually verified by running a number of e2e-go/expect tests locally

@winder winder force-pushed the will/fix-gopath-test-resource-assumption branch from 4832abf to a00b0c2 Compare May 3, 2022 20:38
@codecov-commenter
Copy link

Codecov Report

Merging #3949 (a00b0c2) into master (f83e312) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3949      +/-   ##
==========================================
- Coverage   49.83%   49.81%   -0.03%     
==========================================
  Files         409      409              
  Lines       68897    68897              
==========================================
- Hits        34337    34318      -19     
- Misses      30865    30873       +8     
- Partials     3695     3706      +11     
Impacted Files Coverage Δ
network/netprio.go 69.56% <0.00%> (-8.70%) ⬇️
ledger/tracker.go 70.56% <0.00%> (-6.07%) ⬇️
cmd/algoh/blockWatcher.go 77.77% <0.00%> (-3.18%) ⬇️
network/wsPeer.go 68.61% <0.00%> (-2.23%) ⬇️
data/abi/abi_type.go 87.67% <0.00%> (-0.95%) ⬇️
ledger/acctupdates.go 69.43% <0.00%> (-0.14%) ⬇️
node/node.go 25.03% <0.00%> (+1.84%) ⬆️

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 f83e312...a00b0c2. Read the comment docs.

@algorandskiy algorandskiy merged commit 370d828 into algorand:master May 4, 2022
@winder winder deleted the will/fix-gopath-test-resource-assumption branch May 4, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants