You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Azure Storage CLI is for uploading, fetching and deleting content to and from an Azure blobstore.
It is highly inspired by the https://github.com/cloudfoundry/bosh-s3cli.
# Command: "put"# Upload a blob to the blobstore.
./bosh-azure-storage-cli -c config.json put <path/to/file><remote-blob># Command: "get"# Fetch a blob from the blobstore.# Destination file will be overwritten if exists.
./bosh-azure-storage-cli -c config.json get <remote-blob><path/to/file># Command: "delete"# Remove a blob from the blobstore.
./bosh-azure-storage-cli -c config.json delete <remote-blob># Command: "exists"# Checks if blob exists in the blobstore.
./bosh-azure-storage-cli -c config.json exists <remote-blob># Command: "sign"# Create a self-signed url for a blob in the blobstore.
./bosh-azure-storage-cli -c config.json sign <remote-blob><get|put><seconds-to-expiration>
Using signed urls with curl
# Uploading a blob:
curl -X PUT -H "x-ms-blob-type: blockblob" -F 'fileX=<path/to/file>'<signed url># Downloading a blob:
curl -X GET <signed url>
Running tests
Unit tests
Using ginkgo:
go install github.com/onsi/ginkgo/v2/ginkgo
ginkgo --skip-package=integration --randomize-all --cover -v -r
Using go test:
go test$(go list ./... | grep -v integration)
Integration tests
Export the following variables into your environment: