comparison tests/test-hgweb-commands.t @ 26910:0856f1bfbe1e

test: spread capabilities replies in 'test-hgweb-commands' Any changes to the capabilities string was very hard to review. So we introduce two tests. A small one that validates the format and a second one to validate the content, where each capability is on its own line to make changes simpler to review.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 20 Oct 2015 12:25:09 +0200
parents e901df65b108
children f40f62ea43e0
comparison
equal deleted inserted replaced
26909:e36118815a39 26910:0856f1bfbe1e
2096 ... print line, 2096 ... print line,
2097 var data = [["061dd13ba3c3", [0, 1], [[0, 0, 1, -1, ""]], "\u80fd", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["cad8025a2e87", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch commit with null character: \u0000", "test", "1970-01-01", ["unstable", false], [], []], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]]; 2097 var data = [["061dd13ba3c3", [0, 1], [[0, 0, 1, -1, ""]], "\u80fd", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["cad8025a2e87", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch commit with null character: \u0000", "test", "1970-01-01", ["unstable", false], [], []], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
2098 2098
2099 capabilities 2099 capabilities
2100 2100
2101 $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities'; echo 2101 (plain version to check the format)
2102 200 Script output follows 2102
2103 2103 $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities' | dd ibs=75 count=1 2> /dev/null; echo
2104 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream-preferred stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1*%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 (glob) 2104 200 Script output follows
2105
2106 lookup changegroupsubset branchmap pushkey known
2107
2108 (spread version to check the content)
2109
2110 $ get-with-headers.py 127.0.0.1:$HGPORT '?cmd=capabilities' | tr ' ' '\n'; echo
2111 200
2112 Script
2113 output
2114 follows
2115
2116 lookup
2117 changegroupsubset
2118 branchmap
2119 pushkey
2120 known
2121 getbundle
2122 unbundlehash
2123 batch
2124 stream-preferred
2125 stream
2126 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps
2127 unbundle=HG10GZ,HG10BZ,HG10UN
2128 httpheader=1024
2105 2129
2106 heads 2130 heads
2107 2131
2108 ERRORS ENCOUNTERED 2132 ERRORS ENCOUNTERED
2109 2133