Home
last modified time | relevance | path

Searched hist:"762 f26bac81672772c75ad192b53583cf77831d0" (Results 1 – 4 of 4) sorted by relevance

/haiku/src/tests/kits/net/service/
H A Dtestfile.txt762f26bac81672772c75ad192b53583cf77831d0 Sat Feb 15 18:07:12 UTC 2020 Kyle Ambroff-Kao <kyle@ambroffkao.com> tests/net: Implement testserver.py TLS for HttpsTests

This patch is a followup to 0dde5052b which added testserver.py, a
HTTP echo server for the HttpTests and HttpsTests in the ServicesKit
test suite. This patch implements `testserver.py --use-tls` which
allows for re-enabling HttpsTests.

If `--use-tls` is used, then a self-signed TLS certificate is
generated in a temporary directory which is used by the test
server. This option is used when running HttpsTests.

There doesn't seem to be a good way to have these tests trust the
certificate generated by this test at the moment. Until that API
exists I've just made these tests ignore certificate validation. We'll
want to resolve this and update these tests to actually verify that
validation works as expected.

Some minor tweaks had to be made to testserver.py to take care of
differences in the response body when serving HTTP and HTTPS requests.

Some additional changes:
* Don't depend on any files outside of src/tests/kits/net/service for
these tests. UploadTest was uploading a file from /boot, but I
copied it into the test source directory to avoid having these tests
break if someone makes an unrelated change. It doesn't really matter
what the contents of this file is as long as it doesn't change.
* Use BThreadedTestCase. This speeds up the tests considerably, mostly
because it means that the different test cases can share the same
HttpTest instance, which means there is only a single TestServer
instance, and it takes around half a second to bootstrap the test
server on my system, and even longer if --use-tls is used.

Change-Id: I6d93d390ebd56115365a85109140d175085e1f01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2260
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
H A Dtestserver.py762f26bac81672772c75ad192b53583cf77831d0 Sat Feb 15 18:07:12 UTC 2020 Kyle Ambroff-Kao <kyle@ambroffkao.com> tests/net: Implement testserver.py TLS for HttpsTests

This patch is a followup to 0dde5052b which added testserver.py, a
HTTP echo server for the HttpTests and HttpsTests in the ServicesKit
test suite. This patch implements `testserver.py --use-tls` which
allows for re-enabling HttpsTests.

If `--use-tls` is used, then a self-signed TLS certificate is
generated in a temporary directory which is used by the test
server. This option is used when running HttpsTests.

There doesn't seem to be a good way to have these tests trust the
certificate generated by this test at the moment. Until that API
exists I've just made these tests ignore certificate validation. We'll
want to resolve this and update these tests to actually verify that
validation works as expected.

Some minor tweaks had to be made to testserver.py to take care of
differences in the response body when serving HTTP and HTTPS requests.

Some additional changes:
* Don't depend on any files outside of src/tests/kits/net/service for
these tests. UploadTest was uploading a file from /boot, but I
copied it into the test source directory to avoid having these tests
break if someone makes an unrelated change. It doesn't really matter
what the contents of this file is as long as it doesn't change.
* Use BThreadedTestCase. This speeds up the tests considerably, mostly
because it means that the different test cases can share the same
HttpTest instance, which means there is only a single TestServer
instance, and it takes around half a second to bootstrap the test
server on my system, and even longer if --use-tls is used.

Change-Id: I6d93d390ebd56115365a85109140d175085e1f01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2260
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
H A DHttpTest.h762f26bac81672772c75ad192b53583cf77831d0 Sat Feb 15 18:07:12 UTC 2020 Kyle Ambroff-Kao <kyle@ambroffkao.com> tests/net: Implement testserver.py TLS for HttpsTests

This patch is a followup to 0dde5052b which added testserver.py, a
HTTP echo server for the HttpTests and HttpsTests in the ServicesKit
test suite. This patch implements `testserver.py --use-tls` which
allows for re-enabling HttpsTests.

If `--use-tls` is used, then a self-signed TLS certificate is
generated in a temporary directory which is used by the test
server. This option is used when running HttpsTests.

There doesn't seem to be a good way to have these tests trust the
certificate generated by this test at the moment. Until that API
exists I've just made these tests ignore certificate validation. We'll
want to resolve this and update these tests to actually verify that
validation works as expected.

Some minor tweaks had to be made to testserver.py to take care of
differences in the response body when serving HTTP and HTTPS requests.

Some additional changes:
* Don't depend on any files outside of src/tests/kits/net/service for
these tests. UploadTest was uploading a file from /boot, but I
copied it into the test source directory to avoid having these tests
break if someone makes an unrelated change. It doesn't really matter
what the contents of this file is as long as it doesn't change.
* Use BThreadedTestCase. This speeds up the tests considerably, mostly
because it means that the different test cases can share the same
HttpTest instance, which means there is only a single TestServer
instance, and it takes around half a second to bootstrap the test
server on my system, and even longer if --use-tls is used.

Change-Id: I6d93d390ebd56115365a85109140d175085e1f01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2260
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
H A DHttpTest.cpp762f26bac81672772c75ad192b53583cf77831d0 Sat Feb 15 18:07:12 UTC 2020 Kyle Ambroff-Kao <kyle@ambroffkao.com> tests/net: Implement testserver.py TLS for HttpsTests

This patch is a followup to 0dde5052b which added testserver.py, a
HTTP echo server for the HttpTests and HttpsTests in the ServicesKit
test suite. This patch implements `testserver.py --use-tls` which
allows for re-enabling HttpsTests.

If `--use-tls` is used, then a self-signed TLS certificate is
generated in a temporary directory which is used by the test
server. This option is used when running HttpsTests.

There doesn't seem to be a good way to have these tests trust the
certificate generated by this test at the moment. Until that API
exists I've just made these tests ignore certificate validation. We'll
want to resolve this and update these tests to actually verify that
validation works as expected.

Some minor tweaks had to be made to testserver.py to take care of
differences in the response body when serving HTTP and HTTPS requests.

Some additional changes:
* Don't depend on any files outside of src/tests/kits/net/service for
these tests. UploadTest was uploading a file from /boot, but I
copied it into the test source directory to avoid having these tests
break if someone makes an unrelated change. It doesn't really matter
what the contents of this file is as long as it doesn't change.
* Use BThreadedTestCase. This speeds up the tests considerably, mostly
because it means that the different test cases can share the same
HttpTest instance, which means there is only a single TestServer
instance, and it takes around half a second to bootstrap the test
server on my system, and even longer if --use-tls is used.

Change-Id: I6d93d390ebd56115365a85109140d175085e1f01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2260
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>