3 ;;;; This is for simple prerelase sanity testing, not general
4 ;;;; use. Please ignore.
6 (defpackage #:zs3-tests
9 (in-package #:zs3-tests
)
11 (setf *credentials
* (file-credentials "~/.aws"))
13 (when (bucket-exists-p "zs3-tests")
14 (delete-bucket "zs3-tests"))
16 (create-bucket "zs3-tests")
18 (put-file "/etc/issue" "zs3-tests" "printcap")
19 (put-string "Hello, world" "zs3-tests" "hello")
20 (put-vector (octet-vector 8 6 7 5 3 0 9) "zs3-tests" "jenny")
23 (all-keys "zs3-tests")
25 (delete-object "zs3-tests" "printcap")
26 (delete-object "zs3-tests" "hello")
27 (delete-object "zs3-tests" "jenny")
29 (put-string "Hello, world" "zs3-tests" "hello" :start
1 :end
5)
30 (string= (get-string "zs3-tests" "hello")
31 (subseq "Hello, world" 1 5))
33 (put-file "tests.lisp" "zs3-tests" "self" :start
1 :end
5)
34 (string= (get-string "zs3-tests" "self")
37 (defparameter *jenny
* (octet-vector 8 6 7 5 3 0 9))
38 (put-vector *jenny
* "zs3-tests" "jenny" :start
1 :end
6)
40 (equalp (get-vector "zs3-tests" "jenny")
44 (delete-object "zs3-tests" "hello")
45 (delete-object "zs3-tests" "self")
46 (delete-object "zs3-tests" "jenny")
49 ;;; Testing signing issues
51 (put-string "Slashdot" "zs3-tests" "slash/dot")
52 (put-string "Tildedot" "zs3-tests" "slash~dot")
53 (put-string "Spacedot" "zs3-tests" "slash dot")
55 (delete-object "zs3-tests" "slash/dot")
56 (delete-object "zs3-tests" "slash~dot")
57 (delete-object "zs3-tests" "slash dot")
61 (put-string "Fiddle dee dee" "zs3-tests" "fiddle")
62 (make-public :bucket
"zs3-tests" :key
"fiddle")
63 (make-private :bucket
"zs3-tests" :key
"fiddle")
64 (delete-object "zs3-tests" "fiddle")
66 ;;; CloudFront distributions
68 (defparameter *distro
*
69 (create-distribution "zs3-tests"
70 :cnames
"zs3-tests.cdn.wigflip.com"
72 :comment
"Testing, 1 2 3"))
76 (delete-distribution *distro
*))
78 (delete-bucket "zs3-tests")