diff --git a/.travis.yml b/.travis.yml index 86bbafe..e143f58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,10 @@ language: node_js node_js: - "0.10" notifications: - irc: "irc.esper.net#spongy" + irc: + channels: + - "irc.esper.net#spongy" + skip_join: true services: - redis-server -skip_join: true \ No newline at end of file +skip_join: true diff --git a/test/bulk.sh b/test/bulk.sh index a69f833..6b7feed 100755 --- a/test/bulk.sh +++ b/test/bulk.sh @@ -8,5 +8,5 @@ for uuid in `cat "$dir/uuids.txt"`; do if [ "$(( ((RANDOM<<15)|RANDOM) % 2 ))" -eq "1" ]; then helm="&helm" fi - curl -sS -o /dev/null -w "%{url_effective} %{http_code} %{time_total}s\\n" "http://127.0.0.1:3000/avatars/$uuid?size=$size$helm" || exit 1 + curl -sS -o /dev/null -w "%{url_effective} %{http_code} %{time_total}s\\n" "http://crafatar.com/avatars/$uuid?size=$size$helm" || exit 1 done diff --git a/test/test.js b/test/test.js index b684115..7c226f1 100644 --- a/test/test.js +++ b/test/test.js @@ -9,7 +9,7 @@ var cache = require("../modules/cache"); var uuids = fs.readFileSync('test/uuids.txt').toString().split("\r\n"); // Get a random UUID in order to prevent rate limiting -var uuid = uuids[Math.floor(Math.random() * uuids.length)]; +var uuid = uuids[Math.floor((Math.random() * 200) + 1)]; describe('Avatar Serving', function(){ before(function() { @@ -41,7 +41,7 @@ describe('Avatar Serving', function(){ }); describe('Mojang Errors', function(){ before(function() { - redis.flushall(); + cache.get_redis().flushall(); }); it("should be rate limited", function(done) { helpers.get_avatar(uuid, false, 180, function(err, status, image) { diff --git a/test/valid_uuids.txt b/test/valid_uuids.txt new file mode 100644 index 0000000..a355de6 --- /dev/null +++ b/test/valid_uuids.txt @@ -0,0 +1,7 @@ +00fae87bdb94428eb518184877ba04d7 +00ed2604df0a4d998b16ead25381aeab +00f676c99dd74ce4a1bb010c6005a912 +00d9c689dd2e4b1d8ca8b11c7982e62a +00c73b58032a4881a74564734efcd6e5 +0096895569fb44a7a19e18d9ecd913f0 +008c93d8976d48828f502bb237dbe9ef \ No newline at end of file