summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2011-11-11value-is-same: stop testing G_TYPE_CHARGuillaume Desmottes1-6/+0
g_value_set_char() has been deprecated in GLib and, as said in the FIXME, we don't need to test this as it's not supported by D-Bus.
2011-11-04Merge branch 'gsettings'Will Thompson1-1/+5
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=42068>
2011-11-04exec-with-log.sh.in: export POSIX_ME_HARDER=1Will Thompson1-2/+4
2011-11-04Bind use-conn GSettings key to ConnectivityMonitorWill Thompson1-0/+2
This GSettings key does the same thing as the Empathy one it's an alias for does: if use-conn is False, the network state from NM/ConnMan is ignored, and MC will allow you to try to sign in even if there is supposedly no network connection! It's pretty great. (When I first committed this, it didn't work. Now it does. I don't know why.)
2011-11-04tests: add --enable-installed-testsAlban Crequy12-27/+227
This configure option makes it possible to install the twisted tests in /usr/share/telepathy-mission-control-tests and run them without the sources. https://bugs.freedesktop.org/show_bug.cgi?id=41927
2011-11-04update-parameters.py: fix the cache directoryAlban Crequy1-2/+2
Use $XDG_CACHE_HOME instead of $MC_ACCOUNT_DIR to find the file mcp-test-diverted-account-plugin.conf because the test-only plugin mcp-account-diversion uses g_get_user_cache_dir(). This is a no-op because both variables have the same value, as defined in tests/twisted/Makefile.am: BASIC_TESTS_ENVIRONMENT = \ MC_ACCOUNT_DIR=@abs_top_builddir@/tests/twisted/tmp-$(TMPSUFFIX) \ XDG_CACHE_HOME=@abs_top_builddir@/tests/twisted/tmp-$(TMPSUFFIX) \ However, this was not semantically correct, and the two directories could be different in the future, with installed tests for example.
2011-11-03Account: only set ChangingPresence if we actually areWill Thompson1-2/+36
Previously, ChangingPresence could become True on accounts which were not Enabled, which makes no sense: we're not changing our presence in that case. It happened if you requested an offline presence on a disabled account whose current RequestedPresence is something online; or if you disabled an Enabled account whose RequestedPresence (and CurrentPresence) was offline. Here we change the implementation of setting RequestedPresence to only set ChangingPresence to True if it actually takes some action. There are situations where the presence has "changed" (maybe you changed the message associated with being offline) but no change actually needs to be applied.
2011-11-03account-manager/presence: modernizeWill Thompson1-4/+2
2011-09-28fakeconnectivity: use constant for NM interfaceWill Thompson1-1/+1
2011-09-28Account: reconnect if RequestedPresence is not offlineWill Thompson1-0/+16
Previously, when a network connection came back up, only accounts with ConnectAutomatically set would be re-connected. But if RequestedPresence is something online-flavoured, I think it makes sense to bring such accounts back online, too: if the user has asked to be online, a network blip shouldn't affect that.
2011-09-28am/connectivity: extract BillyIdleWill Thompson1-10/+12
2011-09-28Account: when reconnecting, use RequestedPresence if possibleWill Thompson1-1/+9
Previously, if an account was taken offline due to the internet connection disappearing, when it was brought back up the AutomaticPresence would be used, trampling on whatever the user had put into RequestedPresence. I guess this was deliberate … but it doesn't seem like very useful behaviour. If I've explicitly set my presence to ('available', 'you can talk to me now'), despite my AutomaticPresence being ('busy', 'probably doing something else'), I don't see why a network connection blip should cause my lovingly-written presence to be discarded.
2011-09-28am/connectivity: check for SetPresence callWill Thompson1-2/+7
I'd like to be sure that setting RequestedPresence before the network connection comes up causes that presence to be applied when it does, as opposed to just that the account be brought online.
2011-09-28Add a connectivity testWill Thompson2-0/+119
This test does not run if neither NM nor ConnMan support is available. It also only runs against the test-specific MC daemon, since it depends on a backdoor method for synchronisation.
2011-09-28mctest: split up enable_fakecm_account()Will Thompson1-7/+17
This patch splits out the second half of enable_fakecm_account(), starting at the point where it expects a RequestConnection call, into a new function, expect_fakecm_connection(). enable_fakecm_account() calls it, so its behaviour does not change. But the connectivity-monitoring tests will want to expect a call to RequestConnection() and let that part of the standard check run to completion, so will be able to use the freshly-split-out function.
2011-09-28mctest: resuscitate MC asynchronouslyWill Thompson1-5/+6
Shortly, MC will start making blocking calls on the test suite's fake NM implementation (via nm-glib). Calling bus.get_object service-activated MC as a side-effect of making a blocking call to Introspect() on it, so it deadlocked. I think it's clearer to explicitly, asynchronously activate it, and wait for it to claim its names; which also avoids the deadlock.
2011-09-28account-manager/create-with-properties: modernize and asyncifyWill Thompson1-16/+7
For some reason, the blocking call to Introspect here reliably deadlocked against the blocking call MC will, in a couple of patches' time, make to (the fake) Network Manager service implemented by the test suite. Removing it just made the GetAll() call deadlock instead. If I render that asynchronous, the deadlock goes away. I am not overly happy with having to do this kind of ad-hoc kludging of the test suite to make it run, but we're working around a library bug and I have no interest in delaying the NM integration while I fix nm-glib.
2011-09-28tests: add fake implementations of MC and NMWill Thompson4-5/+119
2011-09-28test service: add a “process idle queue” methodWill Thompson1-1/+32
2011-09-28Add a test app for McdConnectivityMonitorWill Thompson2-1/+57
2011-09-23tests: replace make_mc with class MCWill Thompson7-77/+66
This will make it easier to glue things onto the side of the proxy for MC.
2011-09-23Merge branch 'uncontroversial'Will Thompson11-26/+56
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-23Merge branch 'telepathy-mission-control-5.8+'Will Thompson1-1/+8
2011-09-23Make the regression tests work with D-Bus >= 1.5.6Simon McVittie1-1/+8
The tests rely on being able to eavesdrop. Since D-Bus 1.5.6, normal match rules do not eavesdrop, even if allowed: you have to specifically ask for it. https://bugs.freedesktop.org/show_bug.cgi?id=41090 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21tests: make sync_dbus more reliableWill Thompson1-3/+8
This is taken from Gabble.
2011-09-21mctest: remove unused event_func arg from make_mcWill Thompson8-9/+9
2011-09-21mctest: remove references to parametersWill Thompson1-10/+4
This is cargo-culted from CM tests which actually have connection parameters.
2011-09-21with-session-bus: print log file namesWill Thompson1-4/+7
2011-09-21tests: update with-session-bus.shWill Thompson1-3/+31
This gives us --also-for-system, which will be useful for testing NM integration.
2011-09-21tests: run Python with unbuffered outputWill Thompson1-1/+1
2011-09-20Add unit tests for the case an approver Claim() a CDOXavier Claessens2-0/+142
2011-09-20Unit tests: SimulatedClient with wants_recovery=true fails to prepareXavier Claessens1-1/+1
2011-09-13Test that MC sets reasonable errors when CM crashesWill Thompson2-0/+89
This was intended to be a regression test for <https://bugs.freedesktop.org/show_bug.cgi?id=40129>, but it turned out that MC is already pretty well-behaved.
2011-09-13OCD: sort tests in Makefile.amWill Thompson1-8/+8
2011-09-13mctest: allow running FakeCM on a separate bus connectionWill Thompson1-2/+12
This was possible before, but not exactly straightforward: you had to clone the guts of create_fakecm_account(). By adding an optional parameter to create_fakecm_account(), and a method to SimulatedConnection to drop its bus name, it becomes pretty easy to run the fake CM on a separate bus, and hence simulate it crashing.
2011-09-13servicetest: Implement Event.__str__Will Thompson1-0/+3
This is stolen from Gabble.
2011-09-13am/recover-from-disconnect: miscellaneous pruningWill Thompson1-22/+10
• 'dbus' was imported twice; • 'dbus.service' and various symbols were imported but never used; • a BusName was claimed twice; • dbus.Interface objects were created unnecessarily; • dbus_interface='' was explicitly specified unnecessarily.
2011-09-13with-session-bus.sh: retain newline when forking dbus-monitorWill Thompson1-1/+1
2011-09-13Tests: remove stale FIXMEs about closing channelsWill Thompson2-11/+5
Since 5dfe2f0, Mission Control has not called Close() on channels when you disconnect. The test for this incorrect behaviour was commented out at some point, with a FIXME that the behaviour should be changed. Well, now the behaviour has been changed. So I replaced one with an assertion that Close() is not called, and the other I just removed (since that test doesn't actually have any channels).
2011-09-12Remove unused CHANDLERS_DIRWill Thompson2-6/+0
I really hated Friends.
2011-09-06Merge branch '58-recovery-position'Vivek Dasmohapatra1-6/+47
2011-09-06undispatchable test: assert that observers are invoked, but approvers are notSimon McVittie1-6/+47
Also assert that MC doesn't close the channel as undispatchable until the Observer has had a look at it.
2011-09-01Silent-rules-ify some code generationWill Thompson1-4/+4
2011-08-31tests: don't test Compat.Profile property.Will Thompson2-4/+1
This is slated for removal.
2011-08-31tests: stop using non-standard channel request APIWill Thompson14-170/+79
I would like to remove this API. It was only used by libmcclient, which I would also like to remove. :) Most of these tests don't actually use the non-standard API: they just reference the interface for no good reason.
2011-08-31tests: move all of make_mc to mctestWill Thompson2-12/+7
I have no idea why part of it was in servicetest.
2011-08-25bad-cm: break 'password's type.Will Thompson1-3/+3
Jonny pointed out that, given that the method name contains "account", it's perhaps not the right parameter to check is in the error message returned when an incorrect type is passed.
2011-08-25account-manager/bad-cm: clean up test.Will Thompson1-57/+23
This reduces duplication and modernizes the test a bit.
2011-08-25Test invalid or ill-typed parameters for new accountsWill Thompson1-0/+33
2011-08-25Include CM name when protocol doesn't existWill Thompson1-1/+1
This is not really ideal—the real error is that the CM doesn't exist but due to the current design of this part of MC, it's actually not easy to determine that. So at least including the name of the CM might make the error more obvious.