❗ Warning |
---|
As of January 2023, this project is no longer maintained by Enix, and Seagate has taken over the project. We have archived the repository, and we invite you to join this project at Seagate/seagate-exos-x-csi. |
A Go implementation of the Dothill API.
In order to run tests, you will need to start a mock server by running go run cmd/mock/mock.go
. It will expose the mocked api on localhost:8080
.
You're now ready to go, just run go test -v
to run the tests suite.
You can also run tests with docker-compose, using this command, which is the one used in the CI:
docker-compose up --build --abort-on-container-exit --exit-code-from tests
Both the mocked api and the tests use as username and passwords variables from the environment, or from the .env
file if missing. Since the .env
file is pre-filled, you should not have to add any environment variable in order to make the tests work.
This option runs the golang test cases against a live storage system. Two steps are required:
- Update .env with the correct system IP address and credentials
- Run
go test -v
Another option is to define environment variables, which take precedence over .env values
export TEST_STORAGEIP=http://<ipaddress>
export TEST_USERNAME=<username>
export TEST_PASSWORD=<password>
go test -v
unset TEST_STORAGEIP TEST_PASSWORD TEST_USERNAME