Skip to content

Fix method overwrite warnings in tests #685

@ararslan

Description

@ararslan

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions