commit 9e88f9d9a5df5ab1462296b2ba998f33a1c56ea4 from: Omar Polo date: Thu Mar 28 08:01:54 2024 UTC regress: http-server: hide the HTTP headers The http-server script is already validating the headers, doing so in the regress too is not helpful. commit - 3b44bdbe821e92c08ae1074b204b273b661e1941 commit + 9e88f9d9a5df5ab1462296b2ba998f33a1c56ea4 blob - 7dbafb4ae773efae234479b2c918d895dce5ac1e blob + 5cbff3264bfe341856058856515d41c34ed996bf --- regress/gotd/http-server +++ regress/gotd/http-server @@ -28,9 +28,7 @@ my $pid = open2(my $out, my $in, 'nc', '-l', 'localhos my $clen; while (<$out>) { local $/ = "\r\n"; - chomp; - say; last if /^$/; blob - 5bd5779ff7fd7e13571b71c414ee5f1bb1f6dc2e blob + 0bdee55c775294875ff9724aa4f7744fe0c7b43b --- regress/gotd/http_notification.sh +++ regress/gotd/http_notification.sh @@ -57,13 +57,6 @@ test_file_changed() { d=`date -u -r $author_time +"%a %b %e %X %Y UTC"` cat <<-EOF > $testroot/stdout.expected - POST / HTTP/1.1 - Host: localhost:${GOTD_TEST_HTTP_PORT} - Content-Type: application/json - Content-Length: 224 - User-Agent: got-notify-http/${GOT_VERSION_STR} - Connection: close - {"notifications":[{"short":false,"id":"$commit_id","author":"$GOT_AUTHOR","date":"$d","message":"make changes\n","diffstat":{},"changes":{}}]} EOF @@ -119,17 +112,7 @@ test_many_commits_not_summarized() { wait %1 # wait for the http "server" - cat <<-EOF > $testroot/stdout.expected - POST / HTTP/1.1 - Host: localhost:${GOTD_TEST_HTTP_PORT} - Content-Type: application/json - Content-Length: 4939 - User-Agent: got-notify-http/${GOT_VERSION_STR} - Connection: close - - EOF - - printf '{"notifications":[' >> $testroot/stdout.expected + printf '{"notifications":[' > $testroot/stdout.expected comma="" for i in `seq 1 24`; do s=`pop_idx $i "$@"` @@ -194,17 +177,7 @@ test_many_commits_summarized() { wait %1 # wait for the http "server" - cat <<-EOF > $testroot/stdout.expected - POST / HTTP/1.1 - Host: localhost:${GOTD_TEST_HTTP_PORT} - Content-Type: application/json - Content-Length: 4864 - User-Agent: got-notify-http/${GOT_VERSION_STR} - Connection: close - - EOF - - printf '{"notifications":[' >> $testroot/stdout.expected + printf '{"notifications":[' > $testroot/stdout.expected comma="" for i in `seq 1 51`; do s=`pop_idx $i "$@"`