Today I was working on the writing api that should store objects inside of Amazon S3. I’ve started to think about how to test it without dependency injection and I can focus on development easily leave it as it is. I will place few examples how to do it by using
docker-compose.yml and minio
docker-compose up — build -d to build and run minio server and then you can run
docker exec -it `docker-compose ps -q $NAME` /bin/bash -c “go test <package>“ to test your package.