checkpoint before checking out feature/account-managed-gateway
This commit is contained in:
+39
-2
@@ -319,6 +319,12 @@ verify_immutable_history_denials() {
|
||||
expect_runtime_denied \
|
||||
"admin grant DELETE" \
|
||||
"DELETE FROM admin_credit_grants WHERE 1 = 0"
|
||||
expect_runtime_denied \
|
||||
"StoreKit purchase UPDATE" \
|
||||
"UPDATE storekit_credit_purchases SET credits_granted = credits_granted WHERE 1 = 0"
|
||||
expect_runtime_denied \
|
||||
"StoreKit purchase DELETE" \
|
||||
"DELETE FROM storekit_credit_purchases WHERE 1 = 0"
|
||||
expect_runtime_denied \
|
||||
"Flyway metadata read" \
|
||||
"SELECT version FROM flyway_schema_history LIMIT 1"
|
||||
@@ -464,9 +470,40 @@ WHERE version IS NOT NULL
|
||||
ORDER BY installed_rank;
|
||||
SQL
|
||||
)"
|
||||
EXPECTED_MIGRATIONS=$'1:1\n2:1\n3:1\n4:1\n5:1\n6:1\n7:1\n8:1'
|
||||
EXPECTED_MIGRATIONS=$'1:1\n2:1\n3:1\n4:1\n5:1\n6:1\n7:1\n8:1\n9:1\n10:1\n11:1\n12:1'
|
||||
[[ "$MIGRATIONS" == "$EXPECTED_MIGRATIONS" ]] ||
|
||||
fail "Flyway history was not exactly successful V1-V8"
|
||||
fail "Flyway history was not exactly successful V1-V12"
|
||||
REFERRAL_REWARDS="$(
|
||||
mysql_root --batch --skip-column-names osg_account_smoke <<'SQL'
|
||||
SELECT CONCAT(inviter_reward_credits, ':', invitee_reward_credits)
|
||||
FROM referral_campaigns
|
||||
WHERE id = '00000000-0000-0000-0000-000000000001';
|
||||
SQL
|
||||
)"
|
||||
[[ "$REFERRAL_REWARDS" == "1000:1000" ]] ||
|
||||
fail "default referral rewards were not 1000 credits for both accounts"
|
||||
ACTIVE_RATES="$(
|
||||
mysql_root --batch --skip-column-names osg_account_smoke <<'SQL'
|
||||
SELECT CONCAT_WS(
|
||||
':',
|
||||
kind,
|
||||
provider,
|
||||
model,
|
||||
COALESCE(asr_credits_numerator, '-'),
|
||||
COALESCE(asr_millis_denominator, '-'),
|
||||
COALESCE(input_credits_numerator, '-'),
|
||||
COALESCE(input_tokens_denominator, '-'),
|
||||
COALESCE(output_credits_numerator, '-'),
|
||||
COALESCE(output_tokens_denominator, '-')
|
||||
)
|
||||
FROM credit_rate_versions
|
||||
WHERE effective_until IS NULL
|
||||
ORDER BY kind, provider, model;
|
||||
SQL
|
||||
)"
|
||||
EXPECTED_ACTIVE_RATES=$'ASR:volcengine-sauc-v3:volc.seedasr.sauc.duration:1:3000:-:-:-:-\nLLM:deepseek:deepseek-v4-flash:-:-:1:1000:1:400'
|
||||
[[ "$ACTIVE_RATES" == "$EXPECTED_ACTIVE_RATES" ]] ||
|
||||
fail "active smaller credit rates did not match the V10 contract"
|
||||
compose --profile setup stop schema-migrator >/dev/null
|
||||
|
||||
log "installing exact runtime grants and disposable fixture"
|
||||
|
||||
@@ -22,6 +22,7 @@ GRANT SELECT ON osg_account_smoke.app_attest_challenges TO 'osg_smoke_runtime'@'
|
||||
GRANT SELECT ON osg_account_smoke.app_attest_keys TO 'osg_smoke_runtime'@'%';
|
||||
GRANT SELECT ON osg_account_smoke.account_identity_tombstones TO 'osg_smoke_runtime'@'%';
|
||||
GRANT SELECT ON osg_account_smoke.apple_revocation_outbox TO 'osg_smoke_runtime'@'%';
|
||||
GRANT SELECT ON osg_account_smoke.account_profiles TO 'osg_smoke_runtime'@'%';
|
||||
GRANT SELECT ON osg_account_smoke.admin_operators TO 'osg_smoke_runtime'@'%';
|
||||
GRANT SELECT ON osg_account_smoke.admin_sessions TO 'osg_smoke_runtime'@'%';
|
||||
GRANT SELECT ON osg_account_smoke.admin_audit_log TO 'osg_smoke_runtime'@'%';
|
||||
@@ -48,6 +49,7 @@ GRANT INSERT, UPDATE ON osg_account_smoke.app_attest_challenges TO 'osg_smoke_ru
|
||||
GRANT INSERT, UPDATE ON osg_account_smoke.app_attest_keys TO 'osg_smoke_runtime'@'%';
|
||||
GRANT INSERT, UPDATE ON osg_account_smoke.account_identity_tombstones TO 'osg_smoke_runtime'@'%';
|
||||
GRANT INSERT, UPDATE ON osg_account_smoke.apple_revocation_outbox TO 'osg_smoke_runtime'@'%';
|
||||
GRANT INSERT, UPDATE ON osg_account_smoke.account_profiles TO 'osg_smoke_runtime'@'%';
|
||||
GRANT INSERT, UPDATE ON osg_account_smoke.admin_operators TO 'osg_smoke_runtime'@'%';
|
||||
GRANT INSERT, UPDATE, DELETE ON osg_account_smoke.admin_sessions TO 'osg_smoke_runtime'@'%';
|
||||
GRANT INSERT ON osg_account_smoke.admin_audit_log TO 'osg_smoke_runtime'@'%';
|
||||
|
||||
Reference in New Issue
Block a user