Skip to content

Commit e1e6af8

Browse files
committed
Remove old google sign-in implementation.
1 parent 9220889 commit e1e6af8

File tree

1 file changed

+0
-62
lines changed

1 file changed

+0
-62
lines changed

src/internet_identity/tests/integration/activity_stats/authn_methods.rs

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -301,68 +301,6 @@ fn should_report_active_openid_authn_methods() {
301301
);
302302
}
303303

304-
/// Tests that active Google authn_methods are counted correctly.
305-
/// TODO: Remove this once we remove Google specific OpenID implementation
306-
#[test]
307-
fn should_report_active_google_authn_methods() {
308-
// Create II instance that mocks Google certs
309-
let env = env();
310-
let canister_id = google::setup_canister(&env);
311-
api::init_salt(&env, canister_id).unwrap();
312-
313-
// OpenID test data and fetch Google certs (mock)
314-
let (jwt, salt, _claims, test_time, test_principal, _test_authn_method) =
315-
google::openid_test_data();
316-
env.advance_time(Duration::from_millis(test_time) - Duration::from_nanos(time(&env)));
317-
318-
// Ensure stats are initially absent
319-
assert!(
320-
!get_metrics(&env, canister_id).contains("internet_identity_daily_active_authn_methods")
321-
);
322-
323-
// Create account with Google OpenID
324-
let identity_number =
325-
create_identity_with_openid_credential(&env, canister_id, &jwt, &salt, test_principal);
326-
327-
// Get OpenID delegation principal
328-
let delegation_principal = Principal::self_authenticating(
329-
api::openid_prepare_delegation(
330-
&env,
331-
canister_id,
332-
test_principal,
333-
&jwt,
334-
&salt,
335-
&ByteBuf::from([0u8; 32]),
336-
)
337-
.unwrap()
338-
.unwrap()
339-
.user_key,
340-
);
341-
342-
// Repeated activity within the same period should not increase the counter
343-
api_v2::identity_info(&env, canister_id, delegation_principal, identity_number)
344-
.unwrap()
345-
.unwrap();
346-
347-
// Check daily stats, some activity is required first to update the stats
348-
env.advance_time(Duration::from_secs(DAY_SECONDS));
349-
create_identity_with_authn_method(&env, canister_id, &test_authn_method());
350-
assert_metric(
351-
&get_metrics(&env, canister_id),
352-
"internet_identity_daily_active_authn_methods{type=\"openid\",issuer=\"https://accounts.google.com\"}",
353-
1f64,
354-
);
355-
356-
// Check monthly stats, some activity is required first to update the stats
357-
env.advance_time(Duration::from_secs(MONTH_SECONDS - DAY_SECONDS));
358-
create_identity_with_authn_method(&env, canister_id, &test_authn_method());
359-
assert_metric(
360-
&get_metrics(&env, canister_id),
361-
"internet_identity_monthly_active_authn_methods{type=\"openid\",issuer=\"https://accounts.google.com\"}",
362-
1f64,
363-
);
364-
}
365-
366304
fn authn_methods_all_types() -> Vec<(String, AuthnMethodData)> {
367305
let webauthn_authn_method = AuthnMethod::WebAuthn(WebAuthn {
368306
pubkey: ByteBuf::from("example pubkey"),

0 commit comments

Comments
 (0)