mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 13:38:43 +02:00
libnm/secret-agent/tests: test async/sync initialization of NMSecretAgentOld
Use nmtstc_context_object_new() to create the NMSecretAgentOld. This randomly uses sync or async initialization, and checks whether the main context gets iterated.
This commit is contained in:
parent
18512274ea
commit
8dc760d2c2
1 changed files with 5 additions and 11 deletions
|
|
@ -124,17 +124,11 @@ test_secret_agent_init (TestSecretAgent *agent)
|
||||||
static NMSecretAgentOld *
|
static NMSecretAgentOld *
|
||||||
test_secret_agent_new (void)
|
test_secret_agent_new (void)
|
||||||
{
|
{
|
||||||
NMSecretAgentOld *agent;
|
return nmtstc_context_object_new (test_secret_agent_get_type (),
|
||||||
GError *error = NULL;
|
TRUE,
|
||||||
|
NM_SECRET_AGENT_OLD_IDENTIFIER, "test-secret-agent",
|
||||||
agent = g_initable_new (test_secret_agent_get_type (),
|
NM_SECRET_AGENT_OLD_AUTO_REGISTER, FALSE,
|
||||||
NULL,
|
NULL);
|
||||||
&error,
|
|
||||||
NM_SECRET_AGENT_OLD_IDENTIFIER, "test-secret-agent",
|
|
||||||
NM_SECRET_AGENT_OLD_AUTO_REGISTER, FALSE,
|
|
||||||
NULL);
|
|
||||||
nmtst_assert_success (agent, error);
|
|
||||||
return agent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue