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

Fix method overwrite warnings in tests #685

Open
ararslan opened this issue Jul 2, 2024 · 0 comments · May be fixed by #689
Open

Fix method overwrite warnings in tests #685

ararslan opened this issue Jul 2, 2024 · 0 comments · May be fixed by #689

Comments

@ararslan
Copy link
Member

ararslan commented Jul 2, 2024

This happens because include is being called in a loop:

AWS.jl/test/runtests.jl

Lines 63 to 75 in d7e4dca

backends = [AWS.HTTPBackend, AWS.DownloadsBackend]
@testset "Backend: $(nameof(backend))" for backend in backends
AWS.DEFAULT_BACKEND[] = backend()
include("AWS.jl")
include("IMDS.jl")
include("AWSCredentials.jl")
include("role.jl")
include("issues.jl")
if TEST_MINIO
include("minio.jl")
end
end

Should be fixable by putting the tests for the different backends in their own module, e.g. have the loop body be something like

M = Module()
Core.include(M, "file1")
Core.include(M, "file2")

The annoying thing is just making sure that those modules load the packages they need and bring in things defined at the top level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant