Skip to content

Commit

Permalink
* run-tests.sh: Sort-of testsuite
Browse files Browse the repository at this point in the history
git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@200 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information
ludvigm committed Jun 27, 2008
1 parent fcb7af2 commit 7552d70
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2008-06-27 Michal Ludvig <michal@logix.cz>

* run-tests.sh: Sort-of testsuite

2008-06-23 Michal Ludvig <michal@logix.cz>

* Released version 0.9.8
Expand Down
39 changes: 39 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/sh
set -e -x

./s3cmd mb s3://s3cmd-autotest
./s3cmd ls s3://s3cmd-autotest
./s3cmd put s3cmd s3cmd.1 s3://s3cmd-autotest
./s3cmd ls s3://s3cmd-autotest
./s3cmd del s3://s3cmd-autotest/s3cmd.1
./s3cmd get s3://s3cmd-autotest/s3cmd s3cmd.get
diff s3cmd s3cmd.get
rm -fv s3cmd.get

echo; echo
echo "=== Now running 'sync' tests ==="
echo; echo

VER=$(./s3cmd --version | cut -d\ -f3)
tar xvfz dist/s3cmd-${VER}.tar.gz
echo "Will be removed" > s3cmd-${VER}/file.to.remove
./s3cmd sync s3cmd-${VER} s3://s3cmd-autotest/sync-test
echo "Added file" > s3cmd-${VER}/added.file
rm -f s3cmd-${VER}/file.to.remove
./s3cmd sync --delete s3cmd-${VER} s3://s3cmd-autotest/sync-test
rm -rf s3cmd-${VER}

./s3cmd rb s3://s3cmd-autotest/ || true
# ERROR: S3 error: 409 (Conflict): BucketNotEmpty

# hack to remove all objects from a bucket
mkdir empty
./s3cmd sync --delete empty/ s3://s3cmd-autotest
rm -rf empty

./s3cmd rb s3://s3cmd-autotest/

echo; echo
echo; echo
echo "=== All good. Ready for release :-) ==="
echo

0 comments on commit 7552d70

Please sign in to comment.