/srv/irclogs.ubuntu.com/2014/06/15/#juju-dev.txt

waiganimorning all21:15
waiganisimple review if anyone's interested: https://github.com/juju/juju/pull/9121:19
menn0waigani: mornin'. looking at that PR now.21:33
waiganimenn0: sweet, thanks. I suspect I may have to add more tests - just started with the basic one.21:33
menn0waigani: is the description for the PR correct? You say this implements the client side of the UserInfo but this looks to be the server side.21:39
menn0waigani: ignore me...21:40
menn0waigani: I'm tired. You're right.21:40
waiganimenn0: hehe, I was just composing my explanation21:41
thumperI don't particularly like the "todo, not tested" bits21:41
menn0I got my directory paths and file names mixed up21:41
thumpercan we not work out how to test it?21:41
menn0that was going to be my first review comment... you should be able to mock out the API call to test the error case21:42
waiganithumper: okay, there are other places in the API with the same todo - I was being lazy and followed suit21:42
menn0waigani, thumper: I've just commented with a suggestion on how to do this.21:48
waiganimenn0: yay thanks. I'll plow through these emails asap and get onto it.21:50
menn0waigani: I've added a few more comments and I'm done for now.21:56
waiganimenn0: Great. Thank you!21:56
thumperargh...22:34
thumpermy head hurts22:34
thumperalthough not boxing this time22:34
thumperlots of thinking around identities and users22:34
waiganithumper: and lack of wine?22:39
thumpernot yet22:39
thumperhad a drink last night22:39
thumperbut it will be the last for a while22:39
waiganithe rest of us will have to drink more to put up with you!22:39
waiganiI'm not sure how to mock out a method, without creating a constructor for the object/struct22:40
waiganioh, haha - I just spotted NewUserManagerAPI, looks like a constructor22:41
waiganiignore me22:41
waiganithumper, menn0: I've made the server side UserInfo mockable. How do I mock it out from the client side? It is called over the wire and initialized separately from the client.22:56
thumperwaigani: you shouldn't do it that way22:56
waiganioh22:56
thumperyou should mock out the client's user manager22:56
thumpernot the server side22:56
waiganiback to the drawing board22:57
thumperat least I think...22:57
thumperare there examples of this anywhere?22:57
thumperI have vague recollections of this before22:57
waiganithumper: i get what you're saying, mock out the server endpoint on the client side22:58
thumperyeah22:58
waiganiI'll give it another go after standup22:58
thumperapi/client_test.go line 7522:59
waiganithumper: sweet, thanks22:59
menn0waigani, thumper: in this case it's really easy isn't it? All calls are made through a single standalone function (call()) so patch that function for tests where you'd like to create an error condition.22:59
thumpernot sure how helpful it'll be22:59
thumpermenn0: that seems the obvious place...22:59
=== psivaa is now known as psivaa-afk
waiganiconnection dropped, we were done right?23:20
JoshStroblAny feedback from Juju documenters? https://lists.ubuntu.com/archives/juju-dev/2014-June/002708.html23:22
menn0waigani: yep, we were done23:23
thumperJoshStrobl: we agree it needs to be updated :-)23:45
menn0bikeshedding required! when a relation hook fails should the agent info in the status output look like:23:49
menn0a) hook failed: some-relation-changed for mysql:server23:49
menn0b) hook failed: some-relation-changed with mysql:server23:49
menn0c) hook failed: some-relation-changed for wordpress:mysql to mysql:server23:49
menn0(if the error was being reported for the wordpress charm)23:49
menn0currently we get something like: hook failed: some-relation-changed23:50
waiganic23:50
waiganimenn0: call is a method of Client struct. If I was to make the method mockable, I'd have to add a constructor to the struct.23:50
menn0waigani: I'm talking about the call function at usermanager/client.go:2123:51
waiganimenn0: oooohhh23:52
menn0thumper: any thoughts on the colour of the bike shed?23:52
menn0waigani: to patch you'll probably need to introduce another level of indirection (i.e. a standalone function which takes st and the other args that call() takes.23:55
waiganimenn0: yep, I just missed the call func in usermanager - I went looking further up the tree in api/client23:56
menn0davecheney: any preference on how relation hook failures should be displayed in status output?23:58

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!