-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
Pull requests, bug reports, and all other forms of contribution are welcomed!
You can submit bug reports by opening an issue here. Please be as detailed as you can in the error you encountered and explain what the expected behavior is. If possible, please include any log files generated by Cloudfuse as well, these can be immensely helpful in debugging.
Before submitting a new issue, please check that your bug has not already been reported. If it does you can comment on the existing issue that you are experiencing the issue as well, which helps us to prioritize issues that are affecting many people.
If you have a new idea for a feature for Cloudfuse you can create an issue here. We can't guarantee that we will implement the feature but we welcome new ideas for the project. If you want to get started implementing your feature, that is great and you are welcome to open a pull request.
We welcome new pull requests to fix existing issues or make improvements to the project. Please limit each pull request to one specific issue to make it easier for us to review.
To see how to build Cloudfuse from source to test your changes, see here.
Cloudfuse has a large test suite. The unit tests can be easily setup to be run locally.
First, we will need to setup LocalStack to emulate S3 object storage locally. To install and start LocalStack run the following
pip install localstack awscli-local[ver1]
docker pull localstack/localstack
localstack start -d
To see if localstack is working and available, run the following and you should see a printout with the date and then test
which is the bucket that current exists in localstack.
awslocal s3 mb s3://test
awslocal s3 ls
Next, we need to setup Azurite which can emulate Azure blob storage locally. To install Azurite run the following
npm install -g azurite
Then to start Azurite, run
azurite
which will start the Azurite service.
Next, the unit tests read from two files on the system to get credentials for S3 and Azure storage when doing unit tests. We need to create these files and pass in the default credentials for LocalStack and Azurite.
Create a file ~/s3test.json
with the following data
{
"bucket-name": "test",
"access-key": "test",
"secret-key": "test",
"endpoint": "http://localhost:4566",
"region": "us-east-1",
"use-path-style": true
}
Create a file ~/azuretest.json
with the following data
{
"block-acct": "devstoreaccount1",
"block-key": "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",
"endpoint": "http://127.0.0.1:10000/devstoreaccount1",
"skip-msi": true,
"proxy-address": ""
}
Now that everything is setup to run the unit test suite, run
go test -v ./... --tags=unittest,azurite
This will run almost all unit tests, except those that test Azure ADLS accounts as those cannot be emulated using Azurite.
Please review our code of conduct.