##// END OF EJS Templates
test-webraw: do not store hostname in test output
Vadim Gelfer -
r2547:d75c68b5 default
parent child Browse files
Show More
@@ -1,20 +1,21
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hg init test
3 hg init test
4 cd test
4 cd test
5 cat >sometext.txt <<ENDSOME
5 cat >sometext.txt <<ENDSOME
6 This is just some random text
6 This is just some random text
7 that will go inside the file and take a few lines.
7 that will go inside the file and take a few lines.
8 It is very boring to read, but computers don't
8 It is very boring to read, but computers don't
9 care about things like that.
9 care about things like that.
10 ENDSOME
10 ENDSOME
11 hg add sometext.txt
11 hg add sometext.txt
12 hg commit -d "1 0" -m "Just some text"
12 hg commit -d "1 0" -m "Just some text"
13 hg serve -p 20059 -A access.log -E error.log -d --pid-file=hg.pid
13 hg serve -p 20059 -A access.log -E error.log -d --pid-file=hg.pid
14 ("$TESTDIR/get-with-headers.py" localhost:20059 '/?f=f165dc289438;file=sometext.txt;style=raw' content-type content-length content-disposition) >getoutput.txt &
14 ("$TESTDIR/get-with-headers.py" localhost:20059 '/?f=f165dc289438;file=sometext.txt;style=raw' content-type content-length content-disposition) >getoutput.txt &
15
15
16 sleep 5
16 sleep 5
17 kill `cat hg.pid`
17 kill `cat hg.pid`
18 sleep 1 # wait for server to scream and die
18 sleep 1 # wait for server to scream and die
19 cat getoutput.txt
19 cat getoutput.txt
20 cat access.log error.log | sed 's/^\([^[]*\[\)[^]]*\(\].*\)$/\1date\2/g'
20 cat access.log error.log | \
21 sed 's/^[^ ]*\( [^[]*\[\)[^]]*\(\].*\)$/host\1date\2/'
@@ -1,10 +1,10
1 200 Script output follows
1 200 Script output follows
2 content-type: text/plain
2 content-type: text/plain
3 content-length: 157
3 content-length: 157
4 content-disposition: filename=sometext.txt
4 content-disposition: filename=sometext.txt
5
5
6 This is just some random text
6 This is just some random text
7 that will go inside the file and take a few lines.
7 that will go inside the file and take a few lines.
8 It is very boring to read, but computers don't
8 It is very boring to read, but computers don't
9 care about things like that.
9 care about things like that.
10 localhost - - [date] "GET /?f=f165dc289438;file=sometext.txt;style=raw HTTP/1.1" 200 -
10 host - - [date] "GET /?f=f165dc289438;file=sometext.txt;style=raw HTTP/1.1" 200 -
General Comments 0
You need to be logged in to leave comments. Login now