*** aelkner__ has quit IRC | 00:00 | |
*** jfroche has quit IRC | 00:00 | |
*** aelkner__ has joined #schooltool | 00:08 | |
*** jfroche has joined #schooltool | 00:08 | |
*** Aiste has quit IRC | 00:11 | |
*** Aiste has joined #schooltool | 00:14 | |
*** aelkner__ has quit IRC | 00:23 | |
*** jfroche has quit IRC | 00:23 | |
*** aelkner__ has joined #schooltool | 00:29 | |
*** jfroche has joined #schooltool | 00:29 | |
*** aelkner__ has quit IRC | 00:50 | |
*** jfroche has quit IRC | 00:50 | |
*** aelkner__ has joined #schooltool | 00:57 | |
*** jfroche has joined #schooltool | 00:57 | |
*** aelkner__ has quit IRC | 03:00 | |
*** jfroche has quit IRC | 03:00 | |
*** aelkner__ has joined #schooltool | 03:06 | |
*** jfroche has joined #schooltool | 03:06 | |
*** aelkner__ has quit IRC | 03:07 | |
*** jfroche has quit IRC | 03:07 | |
*** aelkner__ has joined #schooltool | 03:07 | |
*** jfroche has joined #schooltool | 03:07 | |
*** jfroche has quit IRC | 04:26 | |
*** jfroche has joined #schooltool | 04:33 | |
*** ayanami has quit IRC | 04:36 | |
*** didymo has joined #schooltool | 04:46 | |
*** jfroche has quit IRC | 05:38 | |
*** jfroche has joined #schooltool | 05:38 | |
*** didymo has quit IRC | 09:26 | |
*** jfroche has quit IRC | 12:27 | |
*** jfroche has joined #schooltool | 12:30 | |
*** didymo has joined #schooltool | 12:42 | |
*** mgedmin has joined #schooltool | 13:59 | |
*** ignas has joined #schooltool | 14:08 | |
*** didymo has quit IRC | 14:14 | |
*** jelkner has joined #schooltool | 15:23 | |
*** th1a has joined #schooltool | 15:34 | |
*** Lumiere has joined #schooltool | 15:44 | |
Lumiere | morning all | 16:23 |
---|---|---|
Lumiere | th1a: is there no meeting today? | 16:28 |
th1a | This is the starting time. | 16:29 |
th1a | Or in one minute. | 16:29 |
th1a | ... | 16:29 |
aelkner__ | 10, 9, 8, 7... | 16:29 |
Lumiere | lol | 16:30 |
th1a | Good morning/afternoon aelkner__, ignas, Lumiere. | 16:30 |
Lumiere | normally people at least say hi :) | 16:30 |
th1a | I was changing my splints. | 16:30 |
aelkner__ | splints? | 16:30 |
aelkner__ | baseball accident? | 16:31 |
th1a | I have splints on my left ring and right pinky. | 16:31 |
th1a | Indeed. | 16:31 |
th1a | Apparently playing without gloves has certain drawbacks. | 16:31 |
aelkner__ | i could see that | 16:31 |
aelkner__ | were you in the infield | 16:31 |
th1a | Outfield... I just had a lapse in technique. | 16:32 |
th1a | Anyhow, aelkner__, how's CAS testing coming? | 16:33 |
aelkner__ | slowly | 16:33 |
aelkner__ | i struggled with testbrowser last week | 16:33 |
aelkner__ | until i finally called up Stephan Richter | 16:33 |
aelkner__ | who told me that it didn't support redirecting to an outside server | 16:34 |
aelkner__ | but he suggested an idea that could work | 16:34 |
aelkner__ | that being creating a page within the same server | 16:34 |
aelkner__ | that pretends to be the CAS server | 16:34 |
ignas | i thought of doing that, but was wary of getting double authentication | 16:35 |
aelkner__ | yeah | 16:35 |
ignas | that is - internal CAS server trying to use CAS to authenticate | 16:35 |
aelkner__ | right | 16:35 |
aelkner__ | that's the trick i'm wresting with now | 16:35 |
aelkner__ | if i redirect to localhost/fakCAS'login?serverice=... | 16:36 |
aelkner__ | the CAS authentication plugin will get called on that | 16:36 |
aelkner__ | and that would cause an infinite redirection | 16:37 |
aelkner__ | so maybe what i need to do is have the CAS plugin | 16:37 |
aelkner__ | recognize the fact that it's in the middle of traversing to | 16:37 |
aelkner__ | the fakeCAS proxy object | 16:37 |
ignas | ouch | 16:38 |
aelkner__ | and return a manager principal | 16:38 |
th1a | This seems kind of nuts. | 16:38 |
aelkner__ | doesn't it though? | 16:38 |
ignas | that means that you are changing the code of the actual CAS plugin for testing purposes and you are adding a security hole even | 16:38 |
aelkner__ | yeah | 16:38 |
ignas | unless you can add the exception in testing environment only | 16:38 |
ignas | don't do such thing | 16:38 |
th1a | Is it even necessary to actually send a request? | 16:39 |
ignas | th1a: yes :/ | 16:39 |
aelkner__ | it's not sending a request | 16:39 |
ignas | th1a: the redirect part of CAS makes testing it difficult, you can't have an utility that fakes a "back" redirect | 16:39 |
aelkner__ | it's redirecting to the CAS server | 16:39 |
Lumiere | could this be done with ssh redirection? | 16:39 |
ignas | Lumiere: in a functional test? | 16:40 |
Lumiere | yea | 16:40 |
Lumiere | have the script that runs fuctional tests | 16:40 |
ignas | Lumiere: using ssh in a functional test? | 16:40 |
Lumiere | setup a ssh tunnel to the cas | 16:40 |
Lumiere | so the test can connect to localhost | 16:40 |
ignas | Lumiere: no way, really, depending on an external CAS server in a test is bad, depending on ssh - even worse | 16:40 |
Lumiere | ok | 16:41 |
ignas | Lumiere: the reason of all the hassle is - being able to test CAS plugin without an actual CAS server outside of schooltool or it's testing environment | 16:41 |
Lumiere | ok | 16:42 |
ignas | aelkner__: hmm | 16:43 |
aelkner__ | yeah, it's back to the point of the test excersizing code | 16:43 |
ignas | aelkner__: i would probably try moving getCredentials and checkCredentials into a separate utility | 16:43 |
aelkner__ | that doesn't get run live | 16:43 |
ignas | and add a stub utility that acts according to the url in the request | 16:43 |
ignas | so you could special case it | 16:44 |
ignas | in a test | 16:44 |
ignas | without compromising security in a running application | 16:44 |
ignas | the perfect way to do all that stuff would be to add wsgi support to testbrowser | 16:44 |
ignas | than you could intercept the CAS request in the level of wsgi middleware | 16:44 |
ignas | without Zope3 even touching your CAS functionality | 16:44 |
ignas | but I am not sure what's involved in making testbrowser use wsgi instead of zope publisher | 16:45 |
ignas | so it's more of a pie in the sky approach | 16:45 |
aelkner__ | stephan mentioned that testbrowser would have to change | 16:45 |
th1a | I'm just worried that we end up with something that takes a lot of time and doesn't tell us much about how this actually works. | 16:46 |
aelkner__ | i'm definitely worrie about the time aspect | 16:47 |
aelkner__ | i have other projects that i'm not getting to | 16:47 |
ignas | if it was easy to test functionally - i would have written the tests myself when I made the thing "work" :/ | 16:47 |
th1a | Do we have unit tests for CAS? | 16:48 |
aelkner__ | no | 16:48 |
Lumiere | I was going to say... this may be a place for unit testing | 16:48 |
ignas | th1a: there aren't that many parts to unit test ... | 16:49 |
ignas | but yeah | 16:49 |
ignas | unit tests would be a lot better than nothing | 16:49 |
ignas | at least checking that the urls get generated properly | 16:49 |
ignas | for redirects | 16:49 |
aelkner__ | how would you unit test something that redirects | 16:49 |
Lumiere | and that the responses are properly received | 16:49 |
aelkner__ | it's all request based | 16:49 |
ignas | aelkner__: well - look at schooltool view tests | 16:49 |
ignas | aelkner__: that check the response object for the right code and right redirect location | 16:50 |
th1a | The thing is, you get to a point where you're not confident enough in your functional test magic to know if you're getting a failure because of a real problem or the crazy way your tests are set up. | 16:50 |
ignas | aelkner__: a lot of schooltool forms that do redirecting have tests that do that | 16:50 |
aelkner__ | i could look into those today if we all think that is a good plan | 16:51 |
ignas | th1a: the upside is that you can debug your test crazy, while debugging actual CAS integration is very difficult | 16:51 |
ignas | th1a: you have to rely on print tracing with half of the output going into another log file | 16:51 |
th1a | Well, the problem is you still don't know which one needs debugging. | 16:51 |
ignas | that's a hypothetical problem ... | 16:52 |
ignas | we aren't in that stage yet ;) | 16:52 |
ignas | aelkner__: unit tests for all the functions would be enough i think | 16:53 |
th1a | I guess what I used to do for SIF is just call the method that generated the request directly in tests, not using TestBrowser. | 16:53 |
ignas | aelkner__: especially if you can fake responses from CAS server and the expected call order in unit tests | 16:53 |
aelkner__ | which schooltool package has unit tests for views? | 16:54 |
ignas | aelkner__: most of them | 16:54 |
aelkner__ | ok | 16:54 |
aelkner__ | well, i can give that a try today and let you know tomorrow how it turned out | 16:54 |
ignas | look for "request.response.getStatus()" | 16:54 |
ignas | in unit tests | 16:55 |
ignas | that tests if that is "302" | 16:55 |
aelkner__ | right, 302 for redirect | 16:55 |
Lumiere | 302 for temporary redirect | 16:56 |
aelkner__ | schooltool.app.security would probably be the best example to follow | 16:56 |
th1a | So we should be able to test the individual steps, if not the whole browser experience in one go. | 16:56 |
th1a | ? | 16:56 |
aelkner__ | schooltool/app/security.txt | 16:57 |
ignas | maybe | 16:57 |
ignas | th1a: the problem is that it's the whole experience that is prone to bugs and is very easy to mess up | 16:57 |
ignas | th1a: but something is better than nothing | 16:58 |
th1a | Something is better than spending two more weeks on this and never having it really test anything real. | 16:58 |
ignas | aelkner__: doctest_LogoutView in src/schooltool/app/browser/tests/test_app.py is a simple example | 16:58 |
aelkner__ | i'll make a note of that | 16:58 |
th1a | Is one meta-point here that it would have been better to start with unit tests? | 16:59 |
aelkner__ | do you mean test first? :) | 17:00 |
th1a | Yes, but in this case, unit before functional. | 17:00 |
ignas | th1a: not in this case | 17:00 |
ignas | unit tests test whether the thing does what you think it does | 17:00 |
ignas | all of the difficulties i had were - coming up with what it has to do ... | 17:01 |
ignas | loading the whole interaction into my head took quite a while | 17:01 |
aelkner__ | my head has been exploding these last two weeks myself | 17:02 |
aelkner__ | just trying to keep track of all the redirections | 17:02 |
ignas | aelkner__: i really understand why, the doulbe recursion of 2 different applications when calls are implemented as http redirects :/ | 17:02 |
ignas | even having everything in one instance is difficult to comprehend... | 17:02 |
aelkner__ | i've really been feeling like an idiot at times | 17:03 |
th1a | Not being able to use TestBrowser hurts. | 17:04 |
aelkner__ | defnitely | 17:04 |
ignas | it is a complex thing, even tools can help you only that much | 17:05 |
th1a | OK, so what's the plan at this point? | 17:06 |
*** jelkner has quit IRC | 17:06 | |
aelkner__ | i'll defer to ignas' judgement on that | 17:07 |
aelkner__ | shall i take a crack at unit tests? | 17:07 |
ignas | yes, do unit tests | 17:07 |
aelkner__ | that's more than nothing | 17:08 |
ignas | i'll probably talk to my coworkers and ask them if they have any ideas | 17:08 |
ignas | i think alga did something like that when working for zopecorp | 17:08 |
ignas | when testing his utility that works with a remote web application | 17:08 |
ignas | aelkner__: could you commit your bugfixes into cas | 17:09 |
th1a | Is it reasonable to say aelkner__ should stop working on this at the end of the day Wednesday? | 17:09 |
ignas | th1a: i don't know, it's up to him | 17:09 |
aelkner__ | well, i'd love to stop working on this :) | 17:09 |
ignas | i am not using CAS, so he is the one who has to be sure that it works well enough | 17:09 |
th1a | Well, either Wed. or Fri. | 17:09 |
aelkner__ | i'm feeling deadline pressure | 17:09 |
aelkner__ | ignas: i commited my bugfixes to my branch | 17:10 |
aelkner__ | before i started working on tests | 17:10 |
th1a | I'll say do the best you can with unit tests, but don't work on it beyond Wednesday. | 17:10 |
aelkner__ | ok | 17:10 |
th1a | Or sooner if we're lucky. | 17:10 |
aelkner__ | let's hope | 17:11 |
aelkner__ | i'll check back with ignas on my progress same time tomorrow | 17:11 |
ignas | good | 17:11 |
th1a | OK ignas, what have you been up to? | 17:12 |
ignas | nearly finished timetable refactoring | 17:12 |
ignas | only putting back of some safeguards is left | 17:12 |
ignas | then i'll work on adding relationships instead of direct references | 17:12 |
ignas | and start adding school years | 17:12 |
ignas | had to fix some timetabling views during the process | 17:13 |
ignas | because apparently some people managed to leave some bad code in there during sprints ;) | 17:13 |
ignas | that's kind of it | 17:13 |
th1a | OK. | 17:14 |
th1a | I'm getting some momentum behind my documentation-writing. | 17:15 |
th1a | I feel like I have a good workflow now. | 17:15 |
th1a | Lumiere: Any news? | 17:16 |
Lumiere | yea | 17:16 |
Lumiere | ignas, th1a: How should we build different cando packages (for different locations)? | 17:16 |
*** jelkner has joined #schooltool | 17:16 | |
ignas | Lumiere: different locations? | 17:17 |
Lumiere | va's cte program | 17:17 |
Lumiere | vs tom's ri school | 17:17 |
Lumiere | vs arlington career center | 17:17 |
ignas | well - are these instances "identical" | 17:18 |
ignas | ? | 17:18 |
Lumiere | no | 17:18 |
th1a | Why would they need different builds? | 17:18 |
Lumiere | they'll have different modules active | 17:18 |
ignas | oh | 17:18 |
ignas | well - then you create a school setup package | 17:18 |
Lumiere | the va cte one will be very limited | 17:18 |
ignas | like schooltool.stapp2008spring | 17:18 |
Lumiere | the career center one will be cte + an export package | 17:19 |
Lumiere | and ri will be whatever tom wants | 17:19 |
ignas | call them like "cando.cte" "cando.tom" "cando.arlington" | 17:19 |
ignas | and use them ;) | 17:19 |
Lumiere | aelkner__: that work for you? | 17:19 |
aelkner__ | i'll work with whatever you guys decide | 17:20 |
th1a | It doesn't look like we'll be using it here. | 17:20 |
ignas | these packages would store the custom zcml + some customizations like "logo" and css stuff | 17:20 |
th1a | Either way. | 17:20 |
ignas | + evolution scripts in case you decide to "add" or "remove" some modules | 17:20 |
Lumiere | ok | 17:22 |
th1a | Or a stern warning not to do that ;-) | 17:22 |
ignas | unless you are sure you will never change the configuration | 17:22 |
Lumiere | yea I was going to say... | 17:22 |
aelkner__ | :) | 17:22 |
ignas | then you can just set up instances | 17:22 |
ignas | and fix the site.zcml by hand | 17:22 |
ignas | to include the right modules | 17:22 |
Lumiere | ignas: do we have a way to make that work now? (evolution) | 17:22 |
ignas | Lumiere: well - you can make everything work using evolution | 17:23 |
ignas | Lumiere: i am adding/removing stuff from lyceum sometimes | 17:23 |
Lumiere | yes... but can we make evolution scripts work where they're not in the same place | 17:23 |
ignas | Lumiere: and it works fine, as long as you know *how* to write an evolution script | 17:23 |
ignas | that enables schooltool.gradebook | 17:23 |
Lumiere | cause evolution scripts are global... aren't they? | 17:23 |
ignas | Lumiere: not in the same place? | 17:23 |
ignas | Lumiere: kind of, but cando have their own, and schooltool has it's own and lyceum have their own | 17:24 |
ignas | they "stack" | 17:24 |
Lumiere | ok | 17:24 |
ignas | Lumiere: you might want to look at the tizard package | 17:28 |
ignas | in schooltool repository | 17:29 |
Lumiere | ignas: ok | 17:29 |
th1a | That's our hour. | 17:30 |
th1a | I think we covered everyone's issues... | 17:30 |
* th1a drops the bag of gravel. | 17:30 | |
Lumiere | ok | 17:30 |
th1a | Have a great week!~ | 17:30 |
th1a | Stay sane. | 17:31 |
Lumiere | good luck with that | 17:31 |
aelkner__ | i'll try to :) | 17:31 |
*** jelkner has quit IRC | 17:47 | |
*** tdoggette has joined #schooltool | 21:27 | |
*** ignas has quit IRC | 22:33 | |
*** mgedmin has quit IRC | 22:33 | |
*** Lumiere has quit IRC | 22:39 | |
*** Lumiere has joined #schooltool | 22:50 | |
*** tdoggette has quit IRC | 23:22 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!