Created
August 9, 2013 21:23
-
-
Save chmouel/6197349 to your computer and use it in GitHub Desktop.
Random swift tests I am using when reviewing stuff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo $RANDOM > /tmp/a.txt | |
echo $RANDOM > /tmp/b.txt | |
eval $(ks -s localhost demo:demo ADMIN) | |
swift post testbulk >/dev/null | |
swift upload testbulk /tmp/{a,b}.txt >/dev/null | |
curl -i -H 'Content-Type: text/plain' -H "x-auth-token: ${TOKEN}" -X DELETE ${STORAGE_URL}/testbulk\?bulk-delete -d 'testbulk/tmp/a.txt' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
eval $(ks -s) | |
mkdir -p /tmp/tarball/{foo,bar} | |
echo $RANDOM > /tmp/tarball/foo/a.txt | |
echo $RANDOM > /tmp/tarball/bar/b.txt | |
cd /tmp/tarball | |
tar -cf /tmp/example.tar * | |
curl -H "x-auth-token: ${TOKEN}" -i -X PUT ${STORAGE_URL}/?extract-archive=tar --data-binary @/tmp/example.tar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment