Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .evergreen/config_generator/components/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def tasks():
SaslCyrusOpenSSLCompile.call(),
expansions_update(
updates=[
KeyValueParam(key='CC', value='clang'),
KeyValueParam(key='CC', value='gcc'),
# OIDC test servers support both OIDC and user/password.
KeyValueParam(key='AUTH', value='auth'), # Use user/password for default test clients.
KeyValueParam(key='OIDC', value='oidc'), # Enable OIDC tests.
Expand All @@ -66,9 +66,15 @@ def tasks():
def variants():
return [
BuildVariant(
name='oidc',
name='oidc-asan',
display_name='OIDC',
run_on=[find_small_distro('ubuntu2404').name],
tasks=[EvgTaskRef(name='test-oidc-task-group')],
expansions = {
'ASAN': 'on',
'CFLAGS': '-fno-omit-frame-pointer',
'CHECK_LOG': 'ON',
'SANITIZE': 'address,undefined',
}
),
]
2 changes: 1 addition & 1 deletion .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4215,7 +4215,7 @@ tasks:
- command: expansions.update
params:
updates:
- { key: CC, value: clang }
- { key: CC, value: gcc }
- { key: AUTH, value: auth }
- { key: OIDC, value: oidc }
- { key: MONGODB_VERSION, value: latest }
Expand Down
7 changes: 6 additions & 1 deletion .evergreen/generated_configs/variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,15 @@ buildvariants:
SANITIZE: address,undefined
tasks:
- name: mock-server-test
- name: oidc
- name: oidc-asan
display_name: OIDC
run_on:
- ubuntu2404-small
expansions:
ASAN: "on"
CFLAGS: -fno-omit-frame-pointer
CHECK_LOG: "ON"
SANITIZE: address,undefined
tasks:
- name: test-oidc-task-group
- name: openssl-compat-matrix
Expand Down
5 changes: 3 additions & 2 deletions src/libmongoc/tests/test-mongoc-oidc.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,16 @@ test_oidc_bad_config(void *unused)

// Expect error if callback is set twice on pool:
{
mongoc_client_pool_t *pool =
mongoc_client_pool_new(mongoc_uri_new("mongodb://localhost/?authMechanism=MONGODB-OIDC"));
mongoc_uri_t *uri = mongoc_uri_new("mongodb://localhost/?authMechanism=MONGODB-OIDC");
mongoc_client_pool_t *pool = mongoc_client_pool_new(uri);
mongoc_oidc_callback_t *cb = mongoc_oidc_callback_new(oidc_callback_fn);
ASSERT(mongoc_client_pool_set_oidc_callback(pool, cb));
capture_logs(true);
ASSERT(!mongoc_client_pool_set_oidc_callback(pool, cb));
ASSERT_CAPTURED_LOG("oidc", MONGOC_LOG_LEVEL_ERROR, "called once");
mongoc_oidc_callback_destroy(cb);
mongoc_client_pool_destroy(pool);
mongoc_uri_destroy(uri);
}
}

Expand Down