Merge lp:~mandel/ubuntuone-dev-tools/fix-squid-tests into lp:ubuntuone-dev-tools
| Status: | Merged | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Approved by: | Manuel de la Peña on 2012-04-30 | ||||||||||||||||
| Approved revision: | 76 | ||||||||||||||||
| Merged at revision: | 70 | ||||||||||||||||
| Proposed branch: | lp:~mandel/ubuntuone-dev-tools/fix-squid-tests | ||||||||||||||||
| Merge into: | lp:ubuntuone-dev-tools | ||||||||||||||||
| Diff against target: |
509 lines (+266/-33) 9 files modified
data/squid.conf.in (+5/-5) run-tests (+2/-2) run-tests.bat (+3/-1) setup.py (+17/-9) ubuntuone/devtools/services/squid.py (+54/-9) ubuntuone/devtools/services/tests/test_squid.py (+9/-6) ubuntuone/devtools/services/tests/test_squid_linux.py (+67/-0) ubuntuone/devtools/services/tests/test_squid_windows.py (+108/-0) ubuntuone/devtools/testcases/tests/test_squid_testcase.py (+1/-1) |
||||||||||||||||
| To merge this branch: | bzr merge lp:~mandel/ubuntuone-dev-tools/fix-squid-tests | ||||||||||||||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| dobey (community) | Approve on 2012-04-27 | ||
| Eric Casteleijn (community) | 2012-04-24 | Approve on 2012-04-24 | |
|
Review via email:
|
|||
Commit Message
Description of the Change
- Ensured that the ncsa_auth.exe can be found on windows (LP: #987213).
- Formatted the path correctly so that the squid config can read them (LP: #987225).
- Use win32api to kill the squid process (LP: #987256)
- Use dirspec to place the data files correctly on windows (LP: #988228).
In order to tests the branch you have to follow these steps:
1- Download and copy to C:\squid the windows squid binaries from here: http://
2- Downlaod the apacache msi and install it: http://
3- Ensure the following is in your path: C:\squid\
All the above will allow you to run the proxy tests on windows.
Note: The path to the apache bins might differ depending on your system.
| Eric Casteleijn (thisfred) wrote : | # |
| Eric Casteleijn (thisfred) wrote : | # |
Also, what does "source" mean in this context?
| Eric Casteleijn (thisfred) wrote : | # |
I would suggest something like "squid_util" or "squid_helpers" instead of source.
| Eric Casteleijn (thisfred) wrote : | # |
Looks good otherwise, use your own judgement on the above...
| dobey (dobey) wrote : | # |
+# Do use doble \ because squids config needs \ to be escaped
+ """Return the path for the formated for the config."""
Some spelling and grammar fixes need to happen. :)
Also, why do we need to split the Linux and Windows pieces up like this? We need to find a way to run all the tests on all platforms, and just skip the ones that are platform-specific on other platforms.
| Manuel de la Peña (mandel) wrote : | # |
> +# Do use doble \ because squids config needs \ to be escaped
> + """Return the path for the formated for the config."""
>
> Some spelling and grammar fixes need to happen. :)
Fixing!
>
> Also, why do we need to split the Linux and Windows pieces up like this? We
> need to find a way to run all the tests on all platforms, and just skip the
> ones that are platform-specific on other platforms.
Well this is not splitting the tests according to the platform but working around the fact that squid on windows is not a good citizen. The following is a list of the workarounds we have to do to ensure that we can run all squid tests on windows:
* os.kill does not work on windows, we need to use the win api or we will leave the proxy running.
* The squid config is stupid, it needs paths to be C:\\path\\to\\cache rather than C:\path\to\cache, if you don't do that squid wont start.
* The location of the ncsa_auth is diff.
With that fixed we are able to run all tests as long as squid and htpasswd are present in the path.
| Manuel de la Peña (mandel) wrote : | # |
> I would suggest something like "squid_util" or "squid_helpers" instead of
> source.
Fixing!
| Ubuntu One Auto Pilot (otto-pilot) wrote : | # |
Attempt to merge into lp:ubuntuone-dev-tools failed due to conflicts:
text conflict in run-tests.bat
- 76. By Manuel de la Peña on 2012-04-30
-
Fixed conflicts issues with trunk.

98 +if sys.platform == 'win32': devtools. services. squid import windows devtools. services. squid import linux
99 + from ubuntuone.
100 + source = windows
101 +else:
102 + from ubuntuone.
103 + source = linux
why not import windows as source, and import linux as source?