{"thread":{"id":"20712","subject":"[RFC/PATCH 3/3] gitweb: add test cases for snapshot settings","startedAt":"2009-08-23T21:53:23Z","lastAt":"2009-08-24T12:36:12Z","messageCount":2,"participants":["Mark Rada","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"121593","messageId":"4A91BA53.1040800@mailservices.uwaterloo.ca","threadId":"20712","inReplyTo":null,"subject":"[RFC/PATCH 3/3] gitweb: add test cases for snapshot settings","fromName":"Mark Rada","fromEmail":"marada@uwaterloo.ca","sentAt":"2009-08-23T21:53:23Z","receivedAt":"2009-08-23T21:53:23Z","isPatch":true,"sender":{"key":"marada@uwaterloo.ca","avatar":"https://avatars.githubusercontent.com/u/38430?v=4"},"body":"This commit adds a new test file (t9501) that is used for gitweb test\ncases that parse gitweb output to verify the HTTP status code or\nmessage.\n\nSigned-off-by: Mark Rada <marada@uwaterloo.ca>\n---\n t/t9501-gitweb-standalone-http-status.sh |   71 ++++++++++++++++++++++++++++++\n 1 files changed, 71 insertions(+), 0 deletions(-)\n create mode 100644 t/t9501-gitweb-standalone-http-status.sh\n\ndiff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh\nnew file mode 100644\nindex 0000000..c4b0479\n--- /dev/null\n+++ b/t/t9501-gitweb-standalone-http-status.sh\n@@ -0,0 +1,71 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2009 Mark Rada\n+#\n+\n+. ./gitweb-lib.sh\n+\n+# ----------------------------------------------------------------------\n+# snapshot settings\n+\n+test_commit \\\n+\t'SnapshotTest' \\\n+\t'i can has snapshot?'\n+\n+cat >>gitweb_config.perl <<\\EOF\n+$feature{'snapshot'}{'override'} = 0;\n+EOF\n+\n+test_expect_success \\\n+    'snapshots: tgz only default format enabled' \\\n+    'gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=tgz\" &&\n+    grep \"Status: 200 OK\" gitweb.output &&\n+    gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=tbz2\" &&\n+    grep \"403 - Unsupported snapshot format\" gitweb.output &&\n+    gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=txz\" &&\n+    grep \"403 - Snapshot format not allowed\" gitweb.output &&\n+    gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=zip\" &&\n+    grep \"403 - Unsupported snapshot format\" gitweb.output'\n+test_debug 'cat gitweb.output'\n+\n+\n+cat >>gitweb_config.perl <<\\EOF\n+$feature{'snapshot'}{'default'} = ['tgz','tbz2','txz','zip'];\n+EOF\n+\n+test_expect_success \\\n+    'snapshots: all enabled in default, use default disabled value' \\\n+    'gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=tgz\" &&\n+    grep \"Status: 200 OK\" gitweb.output &&\n+    gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=tbz2\" &&\n+    grep \"Status: 200 OK\" gitweb.output &&\n+    gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=txz\" &&\n+    grep \"403 - Snapshot format not allowed\" gitweb.output &&\n+    gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=zip\" &&\n+    grep \"Status: 200 OK\" gitweb.output'\n+test_debug 'cat gitweb.output'\n+\n+\n+cat >>gitweb_config.perl <<\\EOF\n+$known_snapshot_formats{'zip'}{'disabled'} = 1;\n+EOF\n+\n+test_expect_success \\\n+    'snapshots: zip explicitly disabled' \\\n+    'gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=zip\" &&\n+    grep \"403 - Snapshot format not allowed\" gitweb.output'\n+test_debug 'cat gitweb.output'\n+\n+\n+cat >>gitweb_config.perl <<\\EOF\n+$known_snapshot_formats{'tgz'}{'disabled'} = 0;\n+EOF\n+\n+test_expect_success \\\n+    'snapshots: tgz explicitly enabled' \\\n+    'gitweb_run \"p=.git;a=snapshot;h=HEAD;sf=tgz\" &&\n+    grep \"Status: 200 OK\" gitweb.output'\n+test_debug 'cat gitweb.output'\n+\n+\n+test_done \n-- \n1.6.4\n"},{"id":"121627","messageId":"200908241436.13626.jnareb@gmail.com","threadId":"20712","inReplyTo":"4A91BA53.1040800@mailservices.uwaterloo.ca","subject":"Re: [RFC/PATCH 3/3] gitweb: add test cases for snapshot settings","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-08-24T12:36:12Z","receivedAt":"2009-08-24T12:36:12Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Sun, 23 Aug 2009, Mark Rada wrote:\n\n> This commit adds a new test file (t9501) that is used for gitweb test\n> cases that parse gitweb output to verify the HTTP status code or\n> message.\n> \n> Signed-off-by: Mark Rada <marada@uwaterloo.ca>\n> ---\n\nI would rather put emphasis on the fact that new test is created, which\nis meant to check that gitweb produces expected HTTP status codes.\n\n-- >8 --\nSubject: gitweb: Add t9501 test for gitweb's HTTP status codes\n\nThis commit adds a new test file (t9501), that is used for gitweb test\ncases that parse gitweb output to verify the HTTP status code or\nmessage.\n\nCurrently the only tests are about 'snapshot' feature settings\n-- [end cut] --\n\nOr something like that.\n-- \nJakub Narebski\nPoland\n"}]}