func LoadRedisOptions() RedisOptions {
	options := RedisOptions{
		Host: "localhost",
		Port: DefaultRedisPort,
	}
	if host, ok := os.LookupEnv("TEST_REDIS_HOST"); ok {
		options.Host = host
	}
	if val, ok := os.LookupEnv("TEST_REDIS_PORT"); ok {
		options.Port = val
	}
	return options
}
RedisOptions returns the redis options that will be used for the test
cases to connect to.
package test
import (
	"fmt"
	"net"
	"os"
	"time"
	"github.com/getamis/sirius/log"
	redis "gopkg.in/redis.v5"
)
const (
	DefaultRedisPort = "6379"
)
type RedisOptions struct {
	Host string
	Port string
}
func (o RedisOptions) Endpoint() string {
	return net.JoinHostPort(o.Host, o.Port)
}
func (o *RedisOptions) UpdateHostFromContainer(c *Container) error {
	if IsInsideContainer() {
		inspectedContainer, err := c.dockerClient.InspectContainer(c.container.ID)
		if err != nil {
			return err
		}
		o.Host = inspectedContainer.NetworkSettings.IPAddress
	}
	return nil
}
type RedisContainer struct {
	*Container
	Options  RedisOptions
	Endpoint string
}
func (c *RedisContainer) Start() error {
	err := c.Container.Start()
	if err != nil {
		return err
	}
	if err := c.Options.UpdateHostFromContainer(c.Container); err != nil {
		return err
	}
	c.Endpoint = c.Options.Endpoint()
	return nil
}
func (c *RedisContainer) Teardown() error {
	if c.Container != nil && c.Container.Started {
		return c.Container.Stop()
	}
	return nil
}