testcontainers / testcontainers-go

Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done.

Home Page:https://golang.testcontainers.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: AmqpsURL() function returns AMQP url

namewasntfound opened this issue · comments

Testcontainers version

0.29.1

Using the latest Testcontainers version?

Yes

Host OS

MacOS

Host arch

amd64

Go version

1.21

Docker version

N/A

Docker info

N/A

What happened?

I am using the testcontainers-go framework for our integration tests and I noticed that the AmqpsURL() function returns an AMQP URL:

func (c *RabbitMQContainer) AmqpsURL(ctx context.Context) (string, error) {
	endpoint, err := c.PortEndpoint(ctx, nat.Port(DefaultAMQPPort), "")
	if err != nil {
		return "", err
	}

	return fmt.Sprintf("amqps://%s:%s@%s", c.AdminUsername, c.AdminPassword, endpoint), nil
}

Relevant log output

No response

Additional information

No response