diff --git a/scripts/grdm.py b/scripts/grdm.py index 0497acd..f982957 100644 --- a/scripts/grdm.py +++ b/scripts/grdm.py @@ -133,6 +133,38 @@ async def expect_anonymous_toppage(page, idp_name, transition_timeout=30000): else: await expect(page.locator('#wayf_submit_button')).to_be_visible(timeout=transition_timeout) +def assert_not_production_url(*urls, forbidden_patterns): + """実行対象URLが本番相当のパターンに一致しないことを確認し、誤った環境でのGDPR delete等を防ぐ。""" + # 文字列を渡すと1文字ずつ走査され、意図しない一致判定になるため、型を明示的に検査する + assert isinstance(forbidden_patterns, (list, tuple)), ( + f'forbidden_patterns はリスト(またはタプル)で指定してください。' + f'1件のみの場合も ["..."] の形式で指定すること (指定値: {forbidden_patterns!r})' + ) + assert forbidden_patterns, ( + 'forbidden_patterns が空です。本番相当のURLパターンを1つ以上指定してください。' + ) + assert all(isinstance(pattern, str) and pattern for pattern in forbidden_patterns), ( + f'forbidden_patterns の要素は空でない文字列で指定してください (指定値: {forbidden_patterns!r})' + ) + for url in urls: + if not url: + continue + for pattern in forbidden_patterns: + assert pattern not in url, ( + f'このテストは本番相当の環境では実行できません ' + f'(forbidden pattern: {pattern!r}, url: {url!r})' + ) + +async def assert_user_detail_matches(page, *, email=None, transition_timeout=30000): + """ユーザ詳細画面の「ユーザ名」欄を確認し、GDPR delete等での対象取り違えを防ぐ。""" + # 照合条件が無いまま呼ばれると「確認済み」と誤認されるため、条件の指定を必須とする + assert email is not None, ( + 'assert_user_detail_matches に照合条件が指定されていません。' + '対象の取り違えを防ぐためのチェックのため、email を必ず指定してください。' + ) + username_value = page.locator('//tr[td[1][normalize-space()="ユーザ名"]]/td[2]') + await expect(username_value).to_have_text(email, timeout=transition_timeout) + async def _login_idp_pw(page, idp_name, idp_username, idp_password, transition_timeout=30000): login_proc = _login_handlers[idp_name] await login_proc(page, idp_username, idp_password, transition_timeout) diff --git "a/\343\203\206\343\202\271\343\203\210\346\211\213\351\240\206-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277-\345\206\215\343\203\255\343\202\260\343\202\244\343\203\263_Institutions.ipynb" "b/\343\203\206\343\202\271\343\203\210\346\211\213\351\240\206-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277-\345\206\215\343\203\255\343\202\260\343\202\244\343\203\263_Institutions.ipynb" new file mode 100644 index 0000000..bd52a0d --- /dev/null +++ "b/\343\203\206\343\202\271\343\203\210\346\211\213\351\240\206-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277-\345\206\215\343\203\255\343\202\260\343\202\244\343\203\263_Institutions.ipynb" @@ -0,0 +1,1242 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "49e11ed4-e7d1-4789-ae58-4d75f315332f", + "metadata": { + "tags": [ + "parameters" + ] + }, + "outputs": [], + "source": [ + "from getpass import getpass\n", + "\n", + "admin_rdm_url = 'https://admin.bh.rdm.yzwlab.com/' #'https://admin.staging.rdm.example.com/'\n", + "rdm_url = 'https://bh.rdm.yzwlab.com/'\n", + "\n", + "# 本番相当環境と判定するURLパターン(GDPR delete等の破壊的操作の実行前チェックに使用)。\n", + "# 実ホスト名をリポジトリに含めないため、既定値は設定不備を検出できるNoneとする。\n", + "# 破壊的操作を伴うテストのため、実行前にpapermillパラメータとして本番相当のURLパターンを\n", + "# 明示的に指定すること(必須。未設定の場合は後段のチェックで実行が停止する)。\n", + "production_url_forbidden_patterns = None\n", + "\n", + "idp_name_integrated_admin = None\n", + "idp_username_integrated_admin = None\n", + "idp_password_integrated_admin = None\n", + "\n", + "idp_name_quota_test_1 = None\n", + "idp_username_quota_test_1 = None\n", + "idp_password_quota_test_1 = None\n", + "\n", + "# idp_username_quota_test_1 が所属する機関名(テスト中に機関ストレージをAmazon S3へ切り替え、終了時にNII Storageへ戻す)\n", + "target_organization = None\n", + "institution_default_max_quota = 5\n", + "# クォータ一律設定のシステム既定値(テスト終了時にこの値へ戻し、次回実行時も100→5への変更として検証できるようにする)\n", + "system_default_max_quota = 100\n", + "s3_access_key = None\n", + "s3_secret_key = None\n", + "s3_bucket = None\n", + "\n", + "# Server Side Encryption: False = NO\n", + "s3_server_side_encryption = False\n", + "\n", + "# idp_username_quota_test_1 でログインした際にIdPから返されるメールアドレス(Adminのユーザ検索に使用)\n", + "email_search = None\n", + "default_result_path = None\n", + "close_on_fail = False\n", + "transition_timeout = 60000" + ] + }, + { + "cell_type": "markdown", + "id": "38cde7bc-c4fd-4ea3-9099-9f08eb749579", + "metadata": {}, + "source": [ + "## (安全確認) 実行対象の環境が本番相当のURLでないことを確認する\n", + "\n", + "このnotebookはGDPR delete(破壊的操作)を含むため、`admin_rdm_url` / `rdm_url` が既知の\n", + "本番環境URLパターンに一致しないことを、パラメータ確定直後に確認する。papermillパラメータや\n", + "対話入力の設定ミスにより、誤って本番/STG環境に対して実行してしまう事故を防ぐための pre-check。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "035f8331-b8a6-4d6c-bac6-2a3d489b1242", + "metadata": {}, + "outputs": [], + "source": [ + "from scripts import grdm\n", + "\n", + "assert production_url_forbidden_patterns, (\n", + " 'production_url_forbidden_patterns が未設定です。GDPR delete等の破壊的操作を含むテストのため、'\n", + " '実行前に本番相当のURLパターンをpapermillパラメータとして明示的に指定してください。'\n", + ")\n", + "grdm.assert_not_production_url(\n", + " admin_rdm_url, rdm_url,\n", + " forbidden_patterns=production_url_forbidden_patterns,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9718223f-9f94-4d59-8c98-ed3ef09d5e23", + "metadata": {}, + "outputs": [], + "source": [ + "if idp_name_integrated_admin is None:\n", + " idp_name_integrated_admin = input(prompt='IdP name for integrated_admin')\n", + "if idp_username_integrated_admin is None:\n", + " idp_username_integrated_admin = input(prompt=f'Username for {idp_name_integrated_admin}')\n", + "if idp_password_integrated_admin is None:\n", + " idp_password_integrated_admin = getpass(prompt=f'Password for {idp_username_integrated_admin}@{idp_name_integrated_admin}')\n", + "(len(idp_username_integrated_admin), len(idp_password_integrated_admin))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ecb1ef4d", + "metadata": {}, + "outputs": [], + "source": [ + "if s3_access_key is None:\n", + " s3_access_key = input(prompt='S3 Access Key')\n", + "if s3_secret_key is None:\n", + " s3_secret_key = getpass(prompt='S3 Secret Key')\n", + "if s3_bucket is None:\n", + " s3_bucket = input(prompt='S3 Bucket Name')\n", + "(len(s3_access_key), len(s3_secret_key), len(s3_bucket))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "be35387d-b1bf-43cf-b1be-9d7a0dad9582", + "metadata": {}, + "outputs": [], + "source": [ + "if idp_name_quota_test_1 is None:\n", + " idp_name_quota_test_1 = input(prompt='IdP name for quota_test_1')\n", + "if idp_username_quota_test_1 is None:\n", + " idp_username_quota_test_1 = input(prompt=f'Username for {idp_name_quota_test_1}')\n", + "if idp_password_quota_test_1 is None:\n", + " idp_password_quota_test_1 = getpass(prompt=f'Password for {idp_username_quota_test_1}@{idp_name_quota_test_1}')\n", + "if email_search is None:\n", + " email_search = input(prompt='Email address of quota test user 1 (Admin ユーザ検索欄の入力値)')\n", + "if target_organization is None:\n", + " target_organization = input(prompt='Target organization name for quota test (対象機関名)')\n", + "(len(idp_username_quota_test_1), len(idp_password_quota_test_1))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ac02769a-696d-4d87-97e3-7fc8723e6815", + "metadata": {}, + "outputs": [], + "source": [ + "import tempfile\n", + "\n", + "work_dir = tempfile.mkdtemp()\n", + "if default_result_path is None:\n", + " default_result_path = work_dir\n", + "work_dir" + ] + }, + { + "cell_type": "markdown", + "id": "24f64539-4100-4118-b672-fe3ed337ddd4", + "metadata": {}, + "source": [ + "# 機関ストレージのクォータ\n", + "\n", + "- サブシステム名: 機関ストレージのクォータ\n", + "- ページ/アドオン: ログイン\n", + "- 機能分類: ノード管理\n", + "- シナリオ名: ノード管理\n", + "- 用意するテストデータ: URL一覧、アカウント(クォータテストユーザー1), アカウント(統合管理者)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7a70bdfa-3ab0-418b-a14a-e70e682201b2", + "metadata": {}, + "outputs": [], + "source": [ + "import importlib\n", + "import pandas as pd\n", + "\n", + "import scripts.playwright\n", + "importlib.reload(scripts.playwright)\n", + "\n", + "from scripts.playwright import *\n", + "from scripts import grdm\n", + "\n", + "await init_pw_context(close_on_fail=close_on_fail, last_path=default_result_path)" + ] + }, + { + "cell_type": "markdown", + "id": "6b6ca21e-bf9f-48d1-86c1-5ca966398962", + "metadata": {}, + "source": [ + "## ウェブブラウザの同一ウィンドウでGakunin RDM管理者のトップページを表示する\n", + "\n", + "管理者トップページが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ad888678-cef2-4c32-b930-217bfdae8f65", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.goto(admin_rdm_url)\n", + "\n", + " await expect(page.locator('.login-logo')).to_be_visible(timeout=30000)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "19d96869-fcf4-4b45-9845-9e68b311ec71", + "metadata": {}, + "source": [ + "## ログイン情報を用いてGakuNin RDMにログインする\n", + "\n", + "個人の管理者ページが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a02c6829-5f70-459a-8e2c-73790614c35a", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await scripts.grdm.login_as_admin(\n", + " page, idp_name_integrated_admin, idp_username_integrated_admin, idp_password_integrated_admin, transition_timeout=transition_timeout\n", + " )\n", + "\n", + " await expect(page.locator('//*[contains(@class, \"btn-danger\") and contains(text(), \"ログアウト\")]')).to_be_enabled(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "69bdeebd-73ab-4091-b86c-602d1173215a", + "metadata": {}, + "source": [ + "## サイドメニューの「機関ストレージ」を選択する\n", + "\n", + "機関のリスト画面が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5bb3d321-aae5-4dce-8ebd-5f64b1a693ba", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//a[@href = \"/custom_storage_location/institutional_storage/institutions/\"]').click()\n", + "\n", + " await expect(page.locator('//h2[text() = \"機関のリスト\"]')).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "f607e880", + "metadata": {}, + "source": [ + "## 機関のリストから対象機関を選択する\n", + "\n", + "対象機関の機関ストレージ設定画面が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "20ddf096", + "metadata": {}, + "outputs": [], + "source": [ + "import traceback\n", + "\n", + "async def _step(page):\n", + " while True:\n", + " link = page.locator(f'//a[normalize-space() = \"{target_organization}\"]').last\n", + " try:\n", + " await expect(link).to_be_visible()\n", + " except:\n", + " traceback.print_exc()\n", + " print('Search next page...')\n", + " # 次のページかもしれない\n", + " await page.locator('//a[i[contains(@class, \"fa-angle-right\")]]').click()\n", + " await expect(page.locator('//h2[text() = \"機関のリスト\"]')).to_be_visible(timeout=transition_timeout)\n", + " continue\n", + " await link.click()\n", + " break\n", + "\n", + " await expect(page.locator('#s3')).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "b6af22be", + "metadata": {}, + "source": [ + "## 「Amazon S3」のラジオボタンを選択する\n", + "\n", + "「Amazon S3」のラジオボタンが選択された状態になること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cc44d68f", + "metadata": {}, + "outputs": [], + "source": [ + "import asyncio\n", + "\n", + "async def _step(page):\n", + " await page.locator('#s3').check()\n", + "\n", + " # #s3 の change イベントで storage_name の enable/disable が切り替わるため、\n", + " # 状態確認前に少し待って反映されるのを待つ\n", + " await asyncio.sleep(0.5)\n", + "\n", + " # storage_name フィールドの状態を確認し、必要なら入力する\n", + " storage_name = page.locator('#storage_name')\n", + " sn_visible = await storage_name.is_visible()\n", + " sn_enabled = await storage_name.is_enabled() if sn_visible else False\n", + " sn_value = await storage_name.input_value() if sn_visible else ''\n", + " print(f'storage_name: visible={sn_visible}, enabled={sn_enabled}, value=\"{sn_value}\"')\n", + " if sn_visible and sn_enabled and not sn_value.strip():\n", + " await storage_name.fill('Amazon S3')\n", + " print('Filled storage_name: Amazon S3')\n", + "\n", + " await expect(page.locator('#s3')).to_be_checked()\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "fa3c44ea", + "metadata": {}, + "source": [ + "## 「保存」ボタンをクリックし、確認ダイアログで確認文字列を入力して「変更」をクリックする\n", + "\n", + "機関ストレージ変更の確認ダイアログ「機関のストレージを変更してもよろしいですか?」が表示される。表示された確認文字列を入力し、「変更」をクリックすると「Amazon S3アカウントに接続」モーダルが表示されること。\n", + "\n", + "※ 確認文字列はランダムに生成されるため、画面を確認して手入力する。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0f4db7e2", + "metadata": {}, + "outputs": [], + "source": [ + "import asyncio\n", + "\n", + "async def _step(page):\n", + " # Save(保存) ボタンをクリック\n", + " save_btn = page.locator('#institutional_storage_form button.next-btn[type=\"submit\"]').first\n", + " await save_btn.scroll_into_view_if_needed()\n", + " await save_btn.click()\n", + " await asyncio.sleep(2)\n", + "\n", + " # bootbox確認ダイアログが表示されるか確認\n", + " confirm_text = page.locator('#bbConfirmText')\n", + " s3_modal = page.locator('#s3_modal')\n", + "\n", + " try:\n", + " await expect(confirm_text).to_be_visible(timeout=10000)\n", + " # bootbox確認ダイアログが表示された\n", + " confirm_strong = page.locator('//div[contains(@class, \"bootbox-body\")]//strong')\n", + " confirmation_string = await confirm_strong.text_content()\n", + " print(f'Confirmation string: {confirmation_string}')\n", + " await confirm_text.fill(confirmation_string)\n", + " await page.get_by_role('button', name='変更').click()\n", + " await expect(s3_modal).to_be_visible(timeout=transition_timeout)\n", + " print('Confirmed via bootbox dialog')\n", + " except Exception:\n", + " # bootbox確認がない場合、S3モーダルを待つ\n", + " try:\n", + " await expect(s3_modal).to_be_visible(timeout=transition_timeout)\n", + " print('S3 modal appeared directly')\n", + " except Exception as e:\n", + " # どちらも表示されない場合、デバッグ情報を出力(invalidなフィールドを特定するため)\n", + " debug_body = await page.evaluate('() => document.body.innerText.substring(0, 2000)')\n", + " debug_modals = await page.evaluate('() => document.querySelectorAll(\".modal.show, .modal.in\").length')\n", + " debug_bootbox = await page.evaluate('() => document.querySelectorAll(\".bootbox\").length')\n", + " debug_validity = await page.evaluate('() => { var f = document.getElementById(\"institutional_storage_form\"); return f ? f.checkValidity() : \"form not found\"; }')\n", + " debug_invalid = await page.evaluate('''() => {\n", + " var f = document.getElementById(\"institutional_storage_form\");\n", + " if (!f) return [];\n", + " return Array.from(f.querySelectorAll(\":invalid\")).map(el => ({\n", + " tag: el.tagName, id: el.id, name: el.name, required: el.required,\n", + " value: el.value, visible: el.offsetParent !== null\n", + " }));\n", + " }''')\n", + " debug_selected = await page.evaluate('() => { var r = document.querySelector(\"input[name=options]:checked\"); return r ? r.value : \"none\"; }')\n", + " raise Exception(\n", + " f'Neither bootbox nor modal visible. '\n", + " f'modals_show={debug_modals}, bootbox={debug_bootbox}, '\n", + " f'checkValidity={debug_validity}, invalid_fields={debug_invalid}, '\n", + " f'selectedProvider={debug_selected}, '\n", + " f'body={debug_body[:500]}'\n", + " ) from e\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "7bb79036", + "metadata": {}, + "source": [ + "## 「アクセスキー」「シークレットキー」「バケット」欄を入力し、「サーバー側の暗号化を有効にする」の「有効化する」のチェックを外した状態にする\n", + "\n", + "各項目が正しく入力されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "29b454d1", + "metadata": {}, + "outputs": [], + "source": [ + "import asyncio\n", + "\n", + "async def _step(page):\n", + " # Access Key を入力\n", + " await page.locator('#s3_access_key').fill(s3_access_key)\n", + "\n", + " # Secret Key を入力\n", + " await page.locator('#s3_secret_key').fill(s3_secret_key)\n", + "\n", + " # Bucket を入力\n", + " await page.locator('#s3_bucket').fill(s3_bucket)\n", + "\n", + " # Server Side Encryption のチェックボックス\n", + " sse_checkbox = page.locator('#s3_server_side_encryption')\n", + " is_checked = await sse_checkbox.is_checked()\n", + " if s3_server_side_encryption and not is_checked:\n", + " await sse_checkbox.click()\n", + " elif not s3_server_side_encryption and is_checked:\n", + " await sse_checkbox.click()\n", + "\n", + " # keyupイベントを発火させてバリデーションをトリガー\n", + " await page.evaluate('() => { document.querySelectorAll(\"#s3_modal input\").forEach(el => el.dispatchEvent(new Event(\"keyup\", { bubbles: true }))); }')\n", + "\n", + " # 入力後少し待つ\n", + " await asyncio.sleep(1)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "c6639189", + "metadata": {}, + "source": [ + "## 「接続」ボタンをクリックして接続テストを行う\n", + "\n", + "接続テストが成功すること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "10f90738", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " # Connect ボタンをクリック\n", + " connect_btn = page.locator('#s3_connect')\n", + " await expect(connect_btn).to_be_enabled(timeout=transition_timeout)\n", + " await connect_btn.click()\n", + "\n", + " # Save ボタンが有効になるのを待つ(接続成功の証)\n", + " save_btn = page.locator('#s3_save')\n", + " await expect(save_btn).to_be_enabled(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "2630e539", + "metadata": {}, + "source": [ + "## 「保存」ボタンをクリックして設定を保存する\n", + "\n", + "対象機関が「Amazon S3」を機関ストレージとして利用する状態になること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a545d5f4", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " # Save ボタンをクリック\n", + " save_btn = page.locator('#s3_save')\n", + " await save_btn.click()\n", + "\n", + " # 保存成功メッセージは一瞬しか表示されずすぐページがリロードされるため、\n", + " # モーダルが閉じたこと→ページ安定→ラジオの最終状態で完了を確認する\n", + " s3_modal = page.locator('#s3_modal')\n", + " await expect(s3_modal).to_be_hidden(timeout=transition_timeout)\n", + " await page.wait_for_load_state('load', timeout=transition_timeout)\n", + " await expect(page.locator('#s3')).to_be_checked(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "063484a6-795e-41fa-a909-340c6aeeef69", + "metadata": {}, + "source": [ + "## 「機関ストレージのクォータ」を選択し、対象機関を選択する\n", + "\n", + "「機関ストレージのクォータ制御」画面が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "17c961c8-ae12-4512-89d6-278f9b4ba0cd", + "metadata": {}, + "outputs": [], + "source": [ + "import traceback\n", + "\n", + "async def _step(page):\n", + " await page.locator('//a[@href = \"/institutional_storage_quota_control/\"]').click()\n", + "\n", + " while True:\n", + " link = page.locator(f'//a[normalize-space() = \"{target_organization}\"]').last\n", + " try:\n", + " await expect(link).to_be_visible()\n", + " except:\n", + " traceback.print_exc()\n", + " print('Search next page...')\n", + " # 次のページかもしれない\n", + " await page.locator('//a[i[contains(@class, \"fa-angle-right\")]]').click()\n", + " await expect(page.locator('//h2[text() = \"機関ストレージ\"]')).to_be_visible(timeout=transition_timeout)\n", + " continue\n", + " await link.click()\n", + " break\n", + "\n", + " await expect(page.locator('#title')).to_contain_text('機関ストレージのクォータ制御', timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "f95e59d0-21e6-4e72-ac89-2cc5630ae3b7", + "metadata": {}, + "source": [ + "## 「クォータ一律設定 (GB)」欄に、システム既定値(100)と異なる任意の値(例:5)を入力し、「適用」ボタンを押下する\n", + "\n", + "設定値が保存されること(画面に入力値が反映される)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "90fdd5e1-4bff-4714-838b-d5118d9edf50", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('#storageLimit').fill(str(institution_default_max_quota))\n", + " await page.locator('#institutional_storage_form button[type=\"submit\"]').click()\n", + "\n", + " await expect(page.locator('#storageLimit')).to_have_value(str(institution_default_max_quota), timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "1d1fced7-eec9-436e-a277-f0c3e026f8d8", + "metadata": {}, + "source": [ + "## 同一ウィンドウでGRDMトップページへ遷移する\n", + "\n", + "GRDMトップページが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8adeaea1-23a5-4d57-865e-a906c9fd6845", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.goto(rdm_url)\n", + "\n", + " # 同意する ボタンが現れるまで待つ\n", + " await expect(page.locator('//button[text() = \"同意する\"]')).to_be_visible(timeout=transition_timeout)\n", + "\n", + " # 同意する をクリック\n", + " await page.locator('//button[text() = \"同意する\"]').click()\n", + "\n", + " # 同意する が表示されなくなったことを確認\n", + " await expect(page.locator('//button[text() = \"同意する\"]')).to_have_count(0, timeout=500)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "741fc864-a9ba-4af5-bcd4-58ef80a33cca", + "metadata": {}, + "source": [ + "## 「RCOS IdP」を利用し、クォータテストユーザー1としてログインする\n", + "\n", + "設定画面が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "74979dfc-20ed-4e0b-9b0c-45470c75df90", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await scripts.grdm.login(\n", + " page, idp_name_quota_test_1, idp_username_quota_test_1, idp_password_quota_test_1, transition_timeout=transition_timeout\n", + " )\n", + "\n", + " await expect(page.locator('h2.page-header')).to_contain_text('設定', timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "54f1816b-615f-4060-abec-1fe1e69ae4f2", + "metadata": {}, + "source": [ + "※ (補足)ここでは新規ユーザーのUserQuotaに関する手順を実施します\n", + "\n", + "※ (補足)新規ユーザーは初回ログイン時点でプロフィールの必須項目(「姓」「名前」「姓(英語)」「名前(英語)」等)が未入力であるため、ダッシュボードではなく「設定」画面へ遷移する。これは意図した挙動である。" + ] + }, + { + "cell_type": "markdown", + "id": "1365a02e-74c4-4472-a54a-2054311a8213", + "metadata": {}, + "source": [ + "## 同一ウィンドウでGakunin RDM管理者のページへ再度アクセスする\n", + "\n", + "管理者としてログイン済みの状態が維持されており、個人の管理者ページが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ad888678-cef2-4c32-b930-217bfdae8f65", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.goto(admin_rdm_url)\n", + "\n", + " # GRDMトップページへの遷移およびクォータテストユーザー1のログインでは管理者をログアウトしていないため、\n", + " # 管理者セッションは維持されたままであり、個人の管理者ページ(ダッシュボード)が表示されることを確認する\n", + " await expect(page.locator('//*[contains(@class, \"btn-danger\") and contains(text(), \"ログアウト\")]')).to_be_enabled(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "933a800c-39d2-458f-95ba-70ffd7864acc", + "metadata": {}, + "source": [ + "## 「機関ストレージのクォータ」から対象機関の「機関ストレージのクォータ制御」画面を表示し、一覧から新規作成されたクォータテストユーザー1の行を確認する\n", + "\n", + "該当のユーザーが一覧に表示され、「クォータ」列が「クォータ一律設定 (GB)」に設定した値(例:5 GB)と一致することを確認する" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a3b5a60b-aa42-47e6-b5c8-5b04a8ec0262", + "metadata": {}, + "outputs": [], + "source": [ + "import traceback\n", + "\n", + "async def _step(page):\n", + " await page.locator('//a[@href = \"/institutional_storage_quota_control/\"]').click()\n", + "\n", + " while True:\n", + " link = page.locator(f'//a[normalize-space() = \"{target_organization}\"]').last\n", + " try:\n", + " await expect(link).to_be_visible()\n", + " except:\n", + " traceback.print_exc()\n", + " print('Search next page...')\n", + " # 次のページかもしれない\n", + " await page.locator('//a[i[contains(@class, \"fa-angle-right\")]]').click()\n", + " await expect(page.locator('//h2[text() = \"機関ストレージ\"]')).to_be_visible(timeout=transition_timeout)\n", + " continue\n", + " await link.click()\n", + " break\n", + "\n", + " while True:\n", + " row = page.locator(f'//tr[td[contains(text(), \"{email_search}\")]]')\n", + " try:\n", + " await expect(row).to_be_visible(timeout=5000)\n", + " except Exception:\n", + " next_link = page.locator('//a[i[contains(@class, \"fa-angle-right\")]]')\n", + " if await next_link.count() == 0:\n", + " raise\n", + " traceback.print_exc()\n", + " print('Search next page for user row...')\n", + " await next_link.click()\n", + " continue\n", + " break\n", + "\n", + " # スクリーンショットに対象行が写るよう、表示領域内へスクロールしておく\n", + " await row.scroll_into_view_if_needed()\n", + "\n", + " await expect(row.locator('td').last).to_contain_text(f'{institution_default_max_quota} GB', timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "b61bd034-15b4-460f-8248-f31cb25da7b3", + "metadata": {}, + "source": [ + "## 「ユーザ管理」から「ユーザ管理」選択し、 ページを表示する\n", + "\n", + "ユーザ検索画面が表示される" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "82d8d368-342f-4210-bdf9-449b5216c7e5", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//a[@href = \"#collapseUsers\"]').click()\n", + " await page.locator('//a[@href = \"/users/\"]').click()\n", + "\n", + " await expect(page.locator('//input[@name = \"guid\"]').first).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "75a87583-8588-452a-8a04-6b438d25335f", + "metadata": {}, + "source": [ + "## 「ユーザ検索」画面のeメール欄へメールアドレスを入力し、「検索」ボタンを押下する\n", + "\n", + "該当のユーザーが表示される" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "905a10dd-605b-47d2-b60c-acd08f5334bc", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//input[@name = \"email\"]').fill(email_search)\n", + " await page.locator('//input[@type = \"submit\"]').click()\n", + "\n", + " await expect(page.locator(f'//td[contains(text(), \"{email_search}\")]').first).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "a6b88428-603f-4b8b-96cb-50d28dfd3a54", + "metadata": {}, + "source": [ + "## 「ユーザ詳細」画面で「機関ストレージの割当て(GB)」欄の値を確認する\n", + "\n", + "値が「クォータ一律設定 (GB)」に設定した値(例:5)と一致することを確認する" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "429776cc-5441-4fd8-ad5c-d87326fa81ee", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " storage_limit = page.locator('#storageLimit')\n", + "\n", + " # スクリーンショットに対象欄が写るよう、表示領域内へスクロールしておく\n", + " await storage_limit.scroll_into_view_if_needed()\n", + "\n", + " await expect(storage_limit).to_have_value(str(institution_default_max_quota), timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "8ae2f4b8-7f47-4ea4-9030-121b21a1a8d2", + "metadata": {}, + "source": [ + "## (安全確認) 対象ユーザーがemail_searchと一致することを確認する\n", + "\n", + "「GDPRアカウントの削除」ボタンを押下する前に、表示中のユーザ詳細画面のメールアドレスが\n", + "`email_search` と完全一致することを確認する。削除完了alert内のGUID照合(事後確認)だけでは、\n", + "誤った環境で偶然email_searchと一致する別ユーザーを削除してしまう事故を防げないため、\n", + "削除実行前の pre-check として追加。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "34bf3133-953b-437e-b8fe-863ed7399b34", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await grdm.assert_user_detail_matches(page, email=email_search, transition_timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "519131e3-7b28-4b65-8579-93bc6fc15682", + "metadata": {}, + "source": [ + "## 「ユーザ詳細」画面で「GDPRアカウントの削除」ボタンをクリックする\n", + "\n", + "「このユーザーをGDPR削除してもよろしいですか?」ダイアログが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "be18eff8-4bee-4060-a3af-63fef2c69fc7", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.get_by_role(\"link\", name=\"GDPRアカウントの削除\").click()\n", + " await expect( page.locator(\"#deleteModal h3\")).to_contain_text(\"このユーザーをGDPR削除してもよろしいですか?\")\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "b8dc51c5-7e9d-4ae3-9ea1-d4bd90874a37", + "metadata": {}, + "source": [ + "## 「確認」ボタンをクリックする\n", + "\n", + "「User was successfully GDPR deleted」メッセージが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6f579951-6a0c-453f-9b55-add7eedab404", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " uid = page.url.rstrip(\"/\").split(\"/\")[-1]\n", + " print(uid)\n", + "\n", + " await page.locator('#deleteModal input[type=\"submit\"][value=\"確認\"]').click()\n", + " await expect(page.get_by_role(\"alert\").first).to_contain_text(f\"User {uid} was successfully GDPR deleted\")\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "e6b7cd80-352d-4de5-9c47-1828abecc4ff", + "metadata": {}, + "source": [ + "## 「ユーザ管理」から「ユーザ管理」選択し、 ページを表示する\n", + "\n", + "ユーザ検索画面が表示される" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0a93f407-c88b-4eb6-8acd-343435431308", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//a[@href = \"#collapseUsers\"]').click()\n", + " await page.get_by_role(\"link\", name=\"ユーザ管理\").click()\n", + "\n", + " await expect(page.locator('//input[@name = \"guid\"]').first).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "d8205711-9ee5-49aa-8379-e38bf6ef7da1", + "metadata": {}, + "source": [ + "## 「ユーザ検索」画面のeメール欄へメールアドレスを入力し、「検索」ボタンを押下する\n", + "\n", + "「User with email address not found.」が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "48298a8a-8acd-4ff2-b30e-113e8fadd974", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//input[@name = \"email\"]').fill(email_search)\n", + " await page.locator('//input[@type = \"submit\"]').click()\n", + "\n", + " await expect(page.get_by_text(f'User with email address {email_search} not found.')).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "4af37a29", + "metadata": {}, + "source": [ + "## 「機関ストレージのクォータ」から対象機関の「機関ストレージのクォータ制御」画面を表示し、「クォータ一律設定 (GB)」欄をシステム既定値(100)に戻し、「適用」ボタンを押下する\n", + "\n", + "設定値がシステム既定値(100)に戻ること(画面に入力値が反映される)。次回テスト実行時にも100→5への変更として検証できるよう、S3からNII Storageへ切り替える前に既定値へ戻しておく。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "245d9c98", + "metadata": {}, + "outputs": [], + "source": [ + "import traceback\n", + "\n", + "async def _step(page):\n", + " await page.locator('//a[@href = \"/institutional_storage_quota_control/\"]').click()\n", + "\n", + " while True:\n", + " link = page.locator(f'//a[normalize-space() = \"{target_organization}\"]').last\n", + " try:\n", + " await expect(link).to_be_visible()\n", + " except:\n", + " traceback.print_exc()\n", + " print('Search next page...')\n", + " # 次のページかもしれない\n", + " await page.locator('//a[i[contains(@class, \"fa-angle-right\")]]').click()\n", + " await expect(page.locator('//h2[text() = \"機関ストレージ\"]')).to_be_visible(timeout=transition_timeout)\n", + " continue\n", + " await link.click()\n", + " break\n", + "\n", + " storage_limit = page.locator('#storageLimit')\n", + " await storage_limit.fill(str(system_default_max_quota))\n", + " await page.locator('#institutional_storage_form button[type=\"submit\"]').click()\n", + "\n", + " # スクリーンショットに対象欄が写るよう、表示領域内へスクロールしておく\n", + " await storage_limit.scroll_into_view_if_needed()\n", + "\n", + " await expect(storage_limit).to_have_value(str(system_default_max_quota), timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "19671227-83d5-405b-87c9-27ffc907224f", + "metadata": {}, + "source": [ + "## サイドメニューの「機関ストレージ」を選択する\n", + "\n", + "機関のリスト画面が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e795f08f-24d8-4b37-951b-bb051068a7ba", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//a[@href = \"/custom_storage_location/institutional_storage/institutions/\"]').click()\n", + "\n", + " await expect(page.locator('//h2[text() = \"機関のリスト\"]')).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "243dc2af", + "metadata": {}, + "source": [ + "## 機関のリストから対象機関を選択する\n", + "\n", + "対象機関の機関ストレージ設定画面が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8483da89", + "metadata": {}, + "outputs": [], + "source": [ + "import traceback\n", + "\n", + "async def _step(page):\n", + " while True:\n", + " link = page.locator(f'//a[normalize-space() = \"{target_organization}\"]').last\n", + " try:\n", + " await expect(link).to_be_visible()\n", + " except:\n", + " traceback.print_exc()\n", + " print('Search next page...')\n", + " # 次のページかもしれない\n", + " await page.locator('//a[i[contains(@class, \"fa-angle-right\")]]').click()\n", + " await expect(page.locator('//h2[text() = \"機関のリスト\"]')).to_be_visible(timeout=transition_timeout)\n", + " continue\n", + " await link.click()\n", + " break\n", + "\n", + " await expect(page.locator('#osfstorage')).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "0bf71bda", + "metadata": {}, + "source": [ + "## 「NII Storage」のラジオボタンを選択する\n", + "\n", + "「NII Storage」のラジオボタンが選択された状態になること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "09ba0359", + "metadata": {}, + "outputs": [], + "source": [ + "import asyncio\n", + "\n", + "async def _step(page):\n", + " await page.locator('#osfstorage').check()\n", + "\n", + " # #osfstorage の change イベントで storage_name の enable/disable が切り替わるため、\n", + " # 状態確認前に少し待って反映されるのを待つ\n", + " await asyncio.sleep(0.5)\n", + "\n", + " # storage_name フィールドの状態を確認する(NII Storageでは編集不可のはず)\n", + " storage_name = page.locator('#storage_name')\n", + " sn_visible = await storage_name.is_visible()\n", + " sn_enabled = await storage_name.is_enabled() if sn_visible else False\n", + " sn_value = await storage_name.input_value() if sn_visible else ''\n", + " print(f'storage_name: visible={sn_visible}, enabled={sn_enabled}, value=\"{sn_value}\"')\n", + "\n", + " await expect(page.locator('#osfstorage')).to_be_checked()\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "14f5ef3f", + "metadata": {}, + "source": [ + "## 「保存」ボタンをクリックし、確認ダイアログで確認文字列を入力して「変更」をクリックする\n", + "\n", + "機関ストレージ変更の確認ダイアログ「機関のストレージを変更してもよろしいですか?」が表示される。表示された確認文字列を入力し、「変更」をクリックすると「NIIストレージに接続」モーダルが表示されること。\n", + "\n", + "※ 確認文字列はランダムに生成されるため、画面を確認して手入力する。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "467d3aaa", + "metadata": {}, + "outputs": [], + "source": [ + "import asyncio\n", + "\n", + "async def _step(page):\n", + " # Save(保存) ボタンをクリック\n", + " save_btn = page.locator('#institutional_storage_form button.next-btn[type=\"submit\"]').first\n", + " await save_btn.scroll_into_view_if_needed()\n", + " await save_btn.click()\n", + " await asyncio.sleep(2)\n", + "\n", + " # bootbox確認ダイアログが表示されるか確認\n", + " confirm_text = page.locator('#bbConfirmText')\n", + " osfstorage_modal = page.locator('#osfstorage_modal')\n", + "\n", + " try:\n", + " await expect(confirm_text).to_be_visible(timeout=10000)\n", + " # bootbox確認ダイアログが表示された\n", + " confirm_strong = page.locator('//div[contains(@class, \"bootbox-body\")]//strong')\n", + " confirmation_string = await confirm_strong.text_content()\n", + " print(f'Confirmation string: {confirmation_string}')\n", + " await confirm_text.fill(confirmation_string)\n", + " await page.get_by_role('button', name='変更').click()\n", + " await expect(osfstorage_modal).to_be_visible(timeout=transition_timeout)\n", + " print('Confirmed via bootbox dialog')\n", + " except Exception:\n", + " # bootbox確認がない場合、NIIストレージモーダルを待つ\n", + " try:\n", + " await expect(osfstorage_modal).to_be_visible(timeout=transition_timeout)\n", + " print('NII Storage modal appeared directly')\n", + " except Exception as e:\n", + " # どちらも表示されない場合、デバッグ情報を出力\n", + " debug_body = await page.evaluate('() => document.body.innerText.substring(0, 2000)')\n", + " debug_modals = await page.evaluate('() => document.querySelectorAll(\".modal.show, .modal.in\").length')\n", + " debug_bootbox = await page.evaluate('() => document.querySelectorAll(\".bootbox\").length')\n", + " debug_validity = await page.evaluate('() => { var f = document.getElementById(\"institutional_storage_form\"); return f ? f.checkValidity() : \"form not found\"; }')\n", + " debug_selected = await page.evaluate('() => { var r = document.querySelector(\"input[name=options]:checked\"); return r ? r.value : \"none\"; }')\n", + " raise Exception(\n", + " f'Neither bootbox nor modal visible. '\n", + " f'modals_show={debug_modals}, bootbox={debug_bootbox}, '\n", + " f'checkValidity={debug_validity}, selectedProvider={debug_selected}, '\n", + " f'body={debug_body[:500]}'\n", + " ) from e\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "4ce0c786", + "metadata": {}, + "source": [ + "## 「保存」ボタンをクリックして設定を保存する\n", + "\n", + "「機関ストレージ」画面で「NII Storage」のラジオボタンが選択された状態になり、設定が保存されること(対象機関がNII Storage利用状態に戻ること)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bb3f128c", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " # Save ボタンをクリック\n", + " await page.locator('#osfstorage_save').click()\n", + "\n", + " # 保存成功メッセージは一瞬しか表示されずすぐページがリロードされるため、\n", + " # モーダルが閉じたこと→ページ安定→ラジオの最終状態で完了を確認する\n", + " osfstorage_modal = page.locator('#osfstorage_modal')\n", + " await expect(osfstorage_modal).to_be_hidden(timeout=transition_timeout)\n", + " await page.wait_for_load_state('load', timeout=transition_timeout)\n", + " await expect(page.locator('#osfstorage')).to_be_checked(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)\n" + ] + }, + { + "cell_type": "markdown", + "id": "36e082f8-fd22-4bef-ae08-a7baa76f95c4", + "metadata": {}, + "source": [ + "終了処理を実施。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7987e4e4-671b-42df-a27a-d8d3b01a63aa", + "metadata": {}, + "outputs": [], + "source": [ + "await finish_pw_context()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "801b2d22-cd04-480a-84ab-2fb70bd2dd8a", + "metadata": {}, + "outputs": [], + "source": [ + "!rm -fr {work_dir}" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git "a/\343\203\206\343\202\271\343\203\210\346\211\213\351\240\206-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277-\345\206\215\343\203\255\343\202\260\343\202\244\343\203\263_NII.ipynb" "b/\343\203\206\343\202\271\343\203\210\346\211\213\351\240\206-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277-\345\206\215\343\203\255\343\202\260\343\202\244\343\203\263_NII.ipynb" new file mode 100644 index 0000000..c5e0af7 --- /dev/null +++ "b/\343\203\206\343\202\271\343\203\210\346\211\213\351\240\206-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277-\345\206\215\343\203\255\343\202\260\343\202\244\343\203\263_NII.ipynb" @@ -0,0 +1,636 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "8fec76d0-b650-4b39-a225-0f41623e8508", + "metadata": { + "tags": [ + "parameters" + ] + }, + "outputs": [], + "source": [ + "from getpass import getpass\n", + "\n", + "admin_rdm_url = 'https://admin.bh.rdm.yzwlab.com/' #'https://admin.staging.rdm.example.com/'\n", + "rdm_url = 'https://bh.rdm.yzwlab.com/'\n", + "\n", + "# 本番相当環境と判定するURLパターン(GDPR delete等の破壊的操作の実行前チェックに使用)。\n", + "# 実ホスト名をリポジトリに含めないため、既定値は設定不備を検出できるNoneとする。\n", + "# 破壊的操作を伴うテストのため、実行前にpapermillパラメータとして本番相当のURLパターンを\n", + "# 明示的に指定すること(必須。未設定の場合は後段のチェックで実行が停止する)。\n", + "production_url_forbidden_patterns = None\n", + "\n", + "idp_name_integrated_admin = None\n", + "idp_username_integrated_admin = None\n", + "idp_password_integrated_admin = None\n", + "\n", + "idp_name_quota_test_1 = None\n", + "idp_username_quota_test_1 = None\n", + "idp_password_quota_test_1 = None\n", + "\n", + "# idp_username_quota_test_1 が所属する機関名\n", + "target_organization = None\n", + "\n", + "# idp_username_quota_test_1 でログインした際にIdPから返されるメールアドレス(Adminのユーザ検索に使用)\n", + "email_search = None\n", + "default_result_path = None\n", + "close_on_fail = False\n", + "transition_timeout = 60000" + ] + }, + { + "cell_type": "markdown", + "id": "90736b11-8b02-48ca-80e3-337edd1d2bf5", + "metadata": {}, + "source": [ + "## (安全確認) 実行対象の環境が本番相当のURLでないことを確認する\n", + "\n", + "このnotebookはGDPR delete(破壊的操作)を含むため、`admin_rdm_url` / `rdm_url` が既知の\n", + "本番環境URLパターンに一致しないことを、パラメータ確定直後に確認する。papermillパラメータや\n", + "対話入力の設定ミスにより、誤って本番/STG環境に対して実行してしまう事故を防ぐための pre-check。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "38f532ef-9d8d-4f3d-b19a-19d6896c4b60", + "metadata": {}, + "outputs": [], + "source": [ + "from scripts import grdm\n", + "\n", + "assert production_url_forbidden_patterns, (\n", + " 'production_url_forbidden_patterns が未設定です。GDPR delete等の破壊的操作を含むテストのため、'\n", + " '実行前に本番相当のURLパターンをpapermillパラメータとして明示的に指定してください。'\n", + ")\n", + "grdm.assert_not_production_url(\n", + " admin_rdm_url, rdm_url,\n", + " forbidden_patterns=production_url_forbidden_patterns,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9718223f-9f94-4d59-8c98-ed3ef09d5e23", + "metadata": {}, + "outputs": [], + "source": [ + "if idp_name_integrated_admin is None:\n", + " idp_name_integrated_admin = input(prompt='IdP name for integrated_admin')\n", + "if idp_username_integrated_admin is None:\n", + " idp_username_integrated_admin = input(prompt=f'Username for {idp_name_integrated_admin}')\n", + "if idp_password_integrated_admin is None:\n", + " idp_password_integrated_admin = getpass(prompt=f'Password for {idp_username_integrated_admin}@{idp_name_integrated_admin}')\n", + "(len(idp_username_integrated_admin), len(idp_password_integrated_admin))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "be35387d-b1bf-43cf-b1be-9d7a0dad9582", + "metadata": {}, + "outputs": [], + "source": [ + "if idp_name_quota_test_1 is None:\n", + " idp_name_quota_test_1 = input(prompt='IdP name for quota_test_1')\n", + "if idp_username_quota_test_1 is None:\n", + " idp_username_quota_test_1 = input(prompt=f'Username for {idp_name_quota_test_1}')\n", + "if idp_password_quota_test_1 is None:\n", + " idp_password_quota_test_1 = getpass(prompt=f'Password for {idp_username_quota_test_1}@{idp_name_quota_test_1}')\n", + "if email_search is None:\n", + " email_search = input(prompt='Email address of quota test user 1 (Admin ユーザ検索欄の入力値)')\n", + "if target_organization is None:\n", + " target_organization = input(prompt='Target organization name for quota test (対象機関名)')\n", + "(len(idp_username_quota_test_1), len(idp_password_quota_test_1))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ac02769a-696d-4d87-97e3-7fc8723e6815", + "metadata": {}, + "outputs": [], + "source": [ + "import tempfile\n", + "\n", + "work_dir = tempfile.mkdtemp()\n", + "if default_result_path is None:\n", + " default_result_path = work_dir\n", + "work_dir" + ] + }, + { + "cell_type": "markdown", + "id": "b9b70a08-6843-43af-b4f2-3219ca6435bf", + "metadata": {}, + "source": [ + "# NIIストレージのクォータ\n", + "\n", + "- サブシステム名: NIIストレージのクォータ\n", + "- ページ/アドオン: ログイン\n", + "- 機能分類: クォータ管理\n", + "- シナリオ名: クォータ管理\n", + "- 用意するテストデータ: URL一覧、アカウント(クォータテストユーザー1), アカウント(統合管理者)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7a70bdfa-3ab0-418b-a14a-e70e682201b2", + "metadata": {}, + "outputs": [], + "source": [ + "import importlib\n", + "import pandas as pd\n", + "\n", + "import scripts.playwright\n", + "importlib.reload(scripts.playwright)\n", + "\n", + "from scripts.playwright import *\n", + "from scripts import grdm\n", + "\n", + "await init_pw_context(close_on_fail=close_on_fail, last_path=default_result_path)" + ] + }, + { + "cell_type": "markdown", + "id": "fee01f2d-76f1-4017-8abd-637c852ab755", + "metadata": {}, + "source": [ + "## ウェブブラウザの同一ウィンドウでGRDMトップページを表示する\n", + "\n", + "GRDMトップページが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8adeaea1-23a5-4d57-865e-a906c9fd6845", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.goto(rdm_url)\n", + "\n", + " # 同意する ボタンが現れるまで待つ\n", + " await expect(page.locator('//button[text() = \"同意する\"]')).to_be_visible(timeout=transition_timeout)\n", + "\n", + " # 同意する をクリック\n", + " await page.locator('//button[text() = \"同意する\"]').click()\n", + "\n", + " # 同意する が表示されなくなったことを確認\n", + " await expect(page.locator('//button[text() = \"同意する\"]')).to_have_count(0, timeout=500)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "a5619160-7178-47a0-a8ed-75041eafac6c", + "metadata": {}, + "source": [ + "## 「RCOS IdP」を利用し、クォータテストユーザー1としてログインする\n", + "\n", + "設定画面が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "74979dfc-20ed-4e0b-9b0c-45470c75df90", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await scripts.grdm.login(\n", + " page, idp_name_quota_test_1, idp_username_quota_test_1, idp_password_quota_test_1, transition_timeout=transition_timeout\n", + " )\n", + "\n", + " await expect(page.locator('h2.page-header')).to_contain_text('設定', timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "e07bdaad-354a-4103-9468-5aae6e0820c4", + "metadata": {}, + "source": [ + "※ (補足)ここでは新規ユーザーのUserQuotaに関する手順を実施します\n", + "\n", + "※ (補足)新規ユーザーは初回ログイン時点でプロフィールの必須項目(「姓」「名前」「姓(英語)」「名前(英語)」等)が未入力であるため、ダッシュボードではなく「設定」画面へ遷移する。これは意図した挙動である。" + ] + }, + { + "cell_type": "markdown", + "id": "ae552655-b601-4db0-81fd-efff2530d038", + "metadata": {}, + "source": [ + "## ウェブブラウザの同一ウィンドウでGakunin RDM管理者のトップページを表示する\n", + "\n", + "管理者トップページが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ad888678-cef2-4c32-b930-217bfdae8f65", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.goto(admin_rdm_url)\n", + "\n", + " await expect(page.locator('.login-logo')).to_be_visible(timeout=30000)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "e12ae71d-a772-4345-a70a-734153819d40", + "metadata": {}, + "source": [ + "## ログイン情報を用いてGakuNin RDMにログインする\n", + "\n", + "個人の管理者ページが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a02c6829-5f70-459a-8e2c-73790614c35a", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await scripts.grdm.login_as_admin(\n", + " page, idp_name_integrated_admin, idp_username_integrated_admin, idp_password_integrated_admin, transition_timeout=transition_timeout\n", + " )\n", + "\n", + " await expect(page.locator('//*[contains(@class, \"btn-danger\") and contains(text(), \"ログアウト\")]')).to_be_enabled(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "ea7acd80-3972-4f55-9fc9-8564c05376ec", + "metadata": {}, + "source": [ + "## 「NIIストレージのクォータ」を選択する\n", + "\n", + "「NIIストレージ使用の機関のリスト」が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "aa34231f-a66b-414d-ae1d-304155e004ab", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//a[@href = \"/institutions/institution_list/\"]').click()\n", + "\n", + " await expect(page.locator('//h2[text() = \"NIIストレージ使用の機関のリスト\"]')).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "ef205b42-e702-4536-b97a-71d5545ec16e", + "metadata": {}, + "source": [ + "## 「機関のリスト」画面の名前から対象機関を選択する\n", + "\n", + "「NIIストレージの統計ステータス」画面が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5216cea5-e4b7-4abb-ada6-edd3ea78b0a1", + "metadata": {}, + "outputs": [], + "source": [ + "import traceback\n", + "\n", + "async def _step(page):\n", + " while True:\n", + " link = page.locator(f'//a[normalize-space() = \"{target_organization}\"]')\n", + " try:\n", + " await expect(link).to_be_visible()\n", + " except:\n", + " traceback.print_exc()\n", + " print('Search next page...')\n", + " # 次のページかもしれない\n", + " await page.locator('//a[i[contains(@class, \"fa-angle-right\")]]').click()\n", + " await expect(page.locator('//h2[text() = \"NIIストレージ使用の機関のリスト\"]')).to_be_visible(timeout=transition_timeout)\n", + " continue\n", + " await link.click()\n", + " break\n", + "\n", + " await expect(page.locator('//h2[contains(text(), \"NIIストレージの統計ステータス\")]')).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "c93db5b7-9353-49b1-b0ee-e836117fc135", + "metadata": {}, + "source": [ + "## 検索フォームのGUID欄またはeメール欄に新規作成されたクォータテストユーザー1の情報を入力し、「検索」ボタンを押下する\n", + "\n", + "該当のユーザーが一覧に表示され、「クォータ」列が100 GB(システム既定値)であることを確認する" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1e8d3126-e47b-4f78-8974-ffe3c15afdfe", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('#id_email').fill(email_search)\n", + " await page.locator('//button[@type = \"submit\" and text() = \"検索\"]').click()\n", + "\n", + " row = page.locator(f'//tr[td[contains(text(), \"{email_search}\")]]')\n", + " await expect(row).to_be_visible(timeout=transition_timeout)\n", + " await expect(row.locator('td').last).to_contain_text('100 GB', timeout=transition_timeout)\n", + " storage_limit = page.locator('#storageLimit')\n", + "\n", + " # スクリーンショットに対象欄が写るよう、表示領域内へスクロールしておく\n", + " await storage_limit.scroll_into_view_if_needed()\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "df407db4-9b1a-4546-a563-a2358940b6d6", + "metadata": {}, + "source": [ + "## 「ユーザ管理」から「ユーザ管理」選択し、 ページを表示する\n", + "\n", + "ユーザ検索画面が表示される" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "82d8d368-342f-4210-bdf9-449b5216c7e5", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//a[@href = \"#collapseUsers\"]').click()\n", + " await page.locator('//a[@href = \"/users/\"]').click()\n", + "\n", + " await expect(page.locator('//input[@name = \"guid\"]').first).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "5c8f4c15-f68a-4864-abd2-ca0a350b792b", + "metadata": {}, + "source": [ + "## 「ユーザ検索」画面のeメール欄へメールアドレスを入力し、「検索」ボタンを押下する\n", + "\n", + "該当のユーザーが表示される" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "905a10dd-605b-47d2-b60c-acd08f5334bc", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//input[@name = \"email\"]').fill(email_search)\n", + " await page.locator('//input[@type = \"submit\"]').click()\n", + "\n", + " await expect(page.locator(f'//td[contains(text(), \"{email_search}\")]').first).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "45ea924c-a7fb-431d-a95b-6e97853e9e36", + "metadata": {}, + "source": [ + "## 「ユーザ詳細」画面で「NIIストレージの割当て(GB)」欄の値を確認する\n", + "\n", + "値が100であることを確認する" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "79c4c7e4-0a66-4ade-95d8-a3327460e9f7", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " storage_limit = page.locator('#storageLimit')\n", + "\n", + " # スクリーンショットに対象欄が写るよう、表示領域内へスクロールしておく\n", + " await storage_limit.scroll_into_view_if_needed()\n", + " await expect(storage_limit).to_have_value('100', timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "9a372dbb-f700-4ad1-a68a-6e85213324f4", + "metadata": {}, + "source": [ + "## (安全確認) 対象ユーザーがemail_searchと一致することを確認する\n", + "\n", + "「GDPRアカウントの削除」ボタンを押下する前に、表示中のユーザ詳細画面のメールアドレスが\n", + "`email_search` と完全一致することを確認する。削除完了alert内のGUID照合(事後確認)だけでは、\n", + "誤った環境で偶然email_searchと一致する別ユーザーを削除してしまう事故を防げないため、\n", + "削除実行前の pre-check として追加。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e46d1dd3-f9e2-4c10-9fee-32aaa4609351", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await grdm.assert_user_detail_matches(page, email=email_search, transition_timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "f33b4945-13f5-4015-a62d-0fd4636d3c60", + "metadata": {}, + "source": [ + "## 「ユーザ詳細」画面で「GDPRアカウントの削除」ボタンをクリックする\n", + "\n", + "「このユーザーをGDPR削除してもよろしいですか?」ダイアログが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "be18eff8-4bee-4060-a3af-63fef2c69fc7", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.get_by_role(\"link\", name=\"GDPRアカウントの削除\").click()\n", + " await expect( page.locator(\"#deleteModal h3\")).to_contain_text(\"このユーザーをGDPR削除してもよろしいですか?\")\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "54de8ea0-95a5-4c25-9ce6-e20394f4de32", + "metadata": {}, + "source": [ + "## 「確認」ボタンをクリックする\n", + "\n", + "「User was successfully GDPR deleted」メッセージが表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6f579951-6a0c-453f-9b55-add7eedab404", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " uid = page.url.rstrip(\"/\").split(\"/\")[-1]\n", + " print(uid)\n", + "\n", + " await page.locator('#deleteModal input[type=\"submit\"][value=\"確認\"]').click()\n", + " await expect(page.get_by_role(\"alert\").first).to_contain_text(f\"User {uid} was successfully GDPR deleted\")\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "fca9f578-1895-4199-b49b-955a40e9c98e", + "metadata": {}, + "source": [ + "## 「ユーザ管理」から「ユーザ管理」選択し、 ページを表示する\n", + "\n", + "ユーザ検索画面が表示される" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0a93f407-c88b-4eb6-8acd-343435431308", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//a[@href = \"#collapseUsers\"]').click()\n", + " await page.get_by_role(\"link\", name=\"ユーザ管理\").click()\n", + "\n", + " await expect(page.locator('//input[@name = \"guid\"]').first).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "80822321-b11e-4a30-ad74-f958b912f158", + "metadata": {}, + "source": [ + "## 「ユーザ検索」画面のeメール欄へメールアドレスを入力し、「検索」ボタンを押下する\n", + "\n", + "「User with email address not found.」が表示されること" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "48298a8a-8acd-4ff2-b30e-113e8fadd974", + "metadata": {}, + "outputs": [], + "source": [ + "async def _step(page):\n", + " await page.locator('//input[@name = \"email\"]').fill(email_search)\n", + " await page.locator('//input[@type = \"submit\"]').click()\n", + "\n", + " await expect(page.get_by_text(f'User with email address {email_search} not found.')).to_be_visible(timeout=transition_timeout)\n", + "\n", + "await run_pw(_step)" + ] + }, + { + "cell_type": "markdown", + "id": "36e082f8-fd22-4bef-ae08-a7baa76f95c4", + "metadata": {}, + "source": [ + "終了処理を実施。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7987e4e4-671b-42df-a27a-d8d3b01a63aa", + "metadata": {}, + "outputs": [], + "source": [ + "await finish_pw_context()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "801b2d22-cd04-480a-84ab-2fb70bd2dd8a", + "metadata": {}, + "outputs": [], + "source": [ + "!rm -fr {work_dir}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6c9881df-5058-44ac-8254-7740b787fca6", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git "a/\345\217\226\343\202\212\343\201\276\343\201\250\343\202\201-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277.ipynb" "b/\345\217\226\343\202\212\343\201\276\343\201\250\343\202\201-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277.ipynb" new file mode 100644 index 0000000..6954b5b --- /dev/null +++ "b/\345\217\226\343\202\212\343\201\276\343\201\250\343\202\201-\346\251\237\351\226\242\343\202\271\343\203\210\343\203\254\343\203\274\343\202\270\343\201\256\343\202\257\343\202\251\343\203\274\343\202\277.ipynb" @@ -0,0 +1,1307 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "c11c1bc4-80b2-4ddd-aabc-5ce74e190463", + "metadata": { + "deletable": true, + "lc_cell_meme": { + "current": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-24-180d-668a-6bd9-1cbf-c2e1-e2a5-d0cf-f446-23d2-189b", + "history": [ + { + "current": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-8-490a-05fb-01ac-29c3-d4dc-cf29-6b30-a674", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658" + }, + { + "current": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-8-490a-05fb-01ac-29c3-d4dc-cf29-6b30-a674", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658" + }, + { + "current": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-17-3185-bcb1-eb64-ff1f-e88c-0910-7923-180d-668a-6bd9", + "next": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-12-9043-4ba3-5193-3fce-7040-afde-7319-156a-b08a-efc8", + "previous": "05cdacf8-3a56-11f0-8d62-b672e09b3688" + } + ], + "next": "1ad74e8a-a209-11f1-957e-328ca9a0316f" + }, + "pinnedOutputTabIndex": 0, + "run_through_control": { + "frozen": false, + "read_only": false + }, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "parameters" + ] + }, + "outputs": [], + "source": [ + "from getpass import getpass\n", + "\n", + "admin_rdm_url = 'https://admin.bh.rdm.yzwlab.com/' #'https://admin.staging.rdm.example.com/'\n", + "rdm_url = 'https://bh.rdm.yzwlab.com/'\n", + "\n", + "idp_name_integrated_admin = None\n", + "idp_username_integrated_admin = None\n", + "idp_password_integrated_admin = None\n", + "\n", + "idp_name_quota_test_1 = None\n", + "idp_username_quota_test_1 = None\n", + "idp_password_quota_test_1 = None\n", + "\n", + "# idp_username_quota_test_1 が所属する機関名(テスト中に機関ストレージをAmazon S3へ切り替え、終了時にNII Storageへ戻す)\n", + "target_organization = None\n", + "institution_default_max_quota = 5\n", + "s3_access_key = None\n", + "s3_secret_key = None\n", + "s3_bucket = None\n", + "\n", + "# idp_username_quota_test_1 でログインした際にIdPから返されるメールアドレス(Adminのユーザ検索に使用)\n", + "email_search = None\n", + "# 破壊的操作(GDPR delete)を含む子notebookに引き継ぐ、本番相当URLパターン(必須)。\n", + "# 詳細は各子notebook(テスト手順-機関ストレージのクォータ-再ログイン_*)を参照。\n", + "production_url_forbidden_patterns = None\n", + "\n", + "default_result_path = None\n", + "close_on_fail = False\n", + "transition_timeout = 60000\n", + "skip_failed_test = True\n", + "exclude_notebooks = []" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "290d1daa", + "metadata": { + "deletable": true, + "lc_cell_meme": { + "current": "9d21a1c8-949f-11f1-95e8-aed8dc3e1eb9-2-46f1-f806", + "history": [ + { + "current": "9d21a1c8-949f-11f1-95e8-aed8dc3e1eb9-2-46f1-f806", + "next": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-20-b08a-efc8-3530-2030-3739-5c53-5f6f-5547-ff8e-4a83", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-22-0910-7923-180d-668a-6bd9-1cbf-c2e1-e2a5-d0cf-f446" + } + ], + "next": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-22-3530-2030-3739-5c53-5f6f-5547-ff8e-4a83-869b-c4dd", + "previous": "1ad74e8a-a209-11f1-957e-328ca9a0316f" + }, + "pinnedOutputTabIndex": 0, + "run_through_control": { + "frozen": false, + "read_only": false + } + }, + "outputs": [], + "source": [ + "if idp_name_integrated_admin is None:\n", + " idp_name_integrated_admin = input(prompt='IdP name for integrated_admin')\n", + "if idp_username_integrated_admin is None:\n", + " idp_username_integrated_admin = input(prompt=f'Username for {idp_name_integrated_admin}')\n", + "if idp_password_integrated_admin is None:\n", + " idp_password_integrated_admin = getpass(prompt=f'Password for {idp_username_integrated_admin}@{idp_name_integrated_admin}')\n", + "(len(idp_username_integrated_admin), len(idp_password_integrated_admin))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8de00bbb", + "metadata": {}, + "outputs": [], + "source": [ + "if s3_access_key is None:\n", + " s3_access_key = input(prompt='S3 Access Key')\n", + "if s3_secret_key is None:\n", + " s3_secret_key = getpass(prompt='S3 Secret Key')\n", + "if s3_bucket is None:\n", + " s3_bucket = input(prompt='S3 Bucket Name')\n", + "(len(s3_access_key), len(s3_secret_key), len(s3_bucket))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "98f29bed-b81f-4ebf-b015-4cd4853bb0be", + "metadata": { + "deletable": true, + "lc_cell_meme": { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-22-3530-2030-3739-5c53-5f6f-5547-ff8e-4a83-869b-c4dd", + "execution_end_time": "2025-04-02T06:25:57.346Z", + "history": [ + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-2-a21c-c06b" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "a0674b68-0c3c-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-2-a21c-c06b" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "d95d6308-0c3c-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-2-a21c-c06b" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "a8832c1c-0c3d-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-2-a21c-c06b" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "e7480d50-0c3d-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-2-a21c-c06b" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-2-a21c-c06b" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-2-a21c-c06b" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-3-a21c-c06b-54e5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f93f2d46-0c46-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-3-a21c-c06b-54e5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "3295fed4-0c48-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-3-a21c-c06b-54e5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "6a84eba0-0c4a-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-3-a21c-c06b-54e5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "6d481ba6-0c53-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-3-a21c-c06b-54e5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "221c4f0a-0c56-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-3-a21c-c06b-54e5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "19d7ea5a-0c5d-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-3-a21c-c06b-54e5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "377594ca-0c6e-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-3-3215-63a8-9043", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-3-a21c-c06b-54e5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-4-3215-63a8-9043-4ba3", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-4-4202-aef0-78b6-5218", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-5-a21c-c06b-54e5-e070-ec83" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-7-3215-63a8-9043-4ba3-5193-3fce-7040", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-5-4202-aef0-78b6-5218-939f", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-6-a21c-c06b-54e5-e070-ec83-fa46" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-8-3215-63a8-9043-4ba3-5193-3fce-7040-afde", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-8-4202-aef0-78b6-5218-939f-7c1f-36a3-561d", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-9-a21c-c06b-54e5-e070-ec83-fa46-c0e7-3185-bcb1" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-12-9043-4ba3-5193-3fce-7040-afde-7319-156a-b08a-efc8", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-9-4202-aef0-78b6-5218-939f-7c1f-36a3-561d-61b6", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-10-a21c-c06b-54e5-e070-ec83-fa46-c0e7-3185-bcb1-eb64" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-15-3fce-7040-afde-7319-156a-b08a-efc8-3530-2030-3739", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-13-5218-939f-7c1f-36a3-561d-61b6-8267-4a88-1c97-cfab", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-14-ec83-fa46-c0e7-3185-bcb1-eb64-ff1f-e88c-0910-7923" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-16-7040-afde-7319-156a-b08a-efc8-3530-2030-3739-5c53", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-16-36a3-561d-61b6-8267-4a88-1c97-cfab-d694-8563-a497", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-17-3185-bcb1-eb64-ff1f-e88c-0910-7923-180d-668a-6bd9" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-18-7319-156a-b08a-efc8-3530-2030-3739-5c53-5f6f-5547", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-17-561d-61b6-8267-4a88-1c97-cfab-d694-8563-a497-75b6", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-18-bcb1-eb64-ff1f-e88c-0910-7923-180d-668a-6bd9-1cbf" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-19-156a-b08a-efc8-3530-2030-3739-5c53-5f6f-5547-ff8e", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-19-8267-4a88-1c97-cfab-d694-8563-a497-75b6-abbb-1aed", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-20-ff1f-e88c-0910-7923-180d-668a-6bd9-1cbf-c2e1-e2a5" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-20-b08a-efc8-3530-2030-3739-5c53-5f6f-5547-ff8e-4a83", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-20-4a88-1c97-cfab-d694-8563-a497-75b6-abbb-1aed-b103", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-21-e88c-0910-7923-180d-668a-6bd9-1cbf-c2e1-e2a5-d0cf" + }, + { + "current": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-22-3530-2030-3739-5c53-5f6f-5547-ff8e-4a83-869b-c4dd", + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-21-1c97-cfab-d694-8563-a497-75b6-abbb-1aed-b103-5fd5", + "previous": "9d21a1c8-949f-11f1-95e8-aed8dc3e1eb9" + } + ], + "next": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-23-d694-8563-a497-75b6-abbb-1aed-b103-5fd5-3cf4-b14a", + "previous": "9d21a1c8-949f-11f1-95e8-aed8dc3e1eb9-2-46f1-f806" + }, + "pinnedOutputTabIndex": 0, + "run_through_control": { + "frozen": false, + "read_only": false + }, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "if idp_name_quota_test_1 is None:\n", + " idp_name_quota_test_1 = input(prompt='IdP name for quota_test_1')\n", + "if idp_username_quota_test_1 is None:\n", + " idp_username_quota_test_1 = input(prompt=f'Username for {idp_name_quota_test_1}')\n", + "if idp_password_quota_test_1 is None:\n", + " idp_password_quota_test_1 = getpass(prompt=f'Password for {idp_username_quota_test_1}@{idp_name_quota_test_1}')\n", + "if email_search is None:\n", + " email_search = input(prompt='Email address of quota test user 1 (Admin ユーザ検索欄の入力値)')\n", + "if target_organization is None:\n", + " target_organization = input(prompt='Target organization name for quota test (対象機関名)')\n", + "if production_url_forbidden_patterns is None:\n", + " production_url_forbidden_patterns = input(prompt='本番相当環境と判定するURLパターン (カンマ区切り。GDPR delete等の破壊的操作の事前チェックに使用)')\n", + "if isinstance(production_url_forbidden_patterns, str):\n", + " production_url_forbidden_patterns = [p.strip() for p in production_url_forbidden_patterns.split(',') if p.strip()]\n", + "assert production_url_forbidden_patterns, (\n", + " 'production_url_forbidden_patterns が未設定です。GDPR delete等の破壊的操作を含むテストのため、'\n", + " '本番相当のURLパターンを1つ以上指定してください。'\n", + ")\n", + "(len(idp_username_quota_test_1), len(idp_password_quota_test_1))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "97683f65-7f21-419d-8c40-28cca14c5f08", + "metadata": { + "deletable": true, + "lc_cell_meme": { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-23-d694-8563-a497-75b6-abbb-1aed-b103-5fd5-3cf4-b14a", + "execution_end_time": "2025-04-02T06:25:59.737Z", + "history": [ + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-9-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-2-a21c-c06b" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-9-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-9-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-9-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-10-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "next": "a72e1754-0c48-11f0-98e9-5e0a5654d7bd", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0", + "next": "c31532b8-0c48-11f0-98e9-5e0a5654d7bd", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-4-4202-aef0-78b6-5218", + "next": "a72e1754-0c48-11f0-98e9-5e0a5654d7bd", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-1-3215" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-4-4202-aef0-78b6-5218", + "next": "a72e1754-0c48-11f0-98e9-5e0a5654d7bd-2-ce6c-01ad", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-3-3215-63a8-9043" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-5-4202-aef0-78b6-5218-939f", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-12-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11-50c2-120c", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-3-3215-63a8-9043" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-8-4202-aef0-78b6-5218-939f-7c1f-36a3-561d", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-13-4556-863e-9370-b5f5-e658-7a0b-7f11-50c2-120c-62e9", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-4-3215-63a8-9043-4ba3" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-9-4202-aef0-78b6-5218-939f-7c1f-36a3-561d-61b6", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-16-b5f5-e658-7a0b-7f11-50c2-120c-62e9-f0ed-0032-2c57", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-7-3215-63a8-9043-4ba3-5193-3fce-7040" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-13-5218-939f-7c1f-36a3-561d-61b6-8267-4a88-1c97-cfab", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-17-e658-7a0b-7f11-50c2-120c-62e9-f0ed-0032-2c57-2457", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-8-3215-63a8-9043-4ba3-5193-3fce-7040-afde" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-16-36a3-561d-61b6-8267-4a88-1c97-cfab-d694-8563-a497", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-21-120c-62e9-f0ed-0032-2c57-2457-0051-5baf-1381-665a", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-12-9043-4ba3-5193-3fce-7040-afde-7319-156a-b08a-efc8" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-17-561d-61b6-8267-4a88-1c97-cfab-d694-8563-a497-75b6", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-24-0032-2c57-2457-0051-5baf-1381-665a-d5e9-8d86-8cc0", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-15-3fce-7040-afde-7319-156a-b08a-efc8-3530-2030-3739" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-19-8267-4a88-1c97-cfab-d694-8563-a497-75b6-abbb-1aed", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-25-2c57-2457-0051-5baf-1381-665a-d5e9-8d86-8cc0-d3ae", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-16-7040-afde-7319-156a-b08a-efc8-3530-2030-3739-5c53" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-20-4a88-1c97-cfab-d694-8563-a497-75b6-abbb-1aed-b103", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-27-0051-5baf-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-18-7319-156a-b08a-efc8-3530-2030-3739-5c53-5f6f-5547" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-21-1c97-cfab-d694-8563-a497-75b6-abbb-1aed-b103-5fd5", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-28-5baf-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-19-156a-b08a-efc8-3530-2030-3739-5c53-5f6f-5547-ff8e" + }, + { + "current": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-23-d694-8563-a497-75b6-abbb-1aed-b103-5fd5-3cf4-b14a", + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-29-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b-d5ec", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-20-b08a-efc8-3530-2030-3739-5c53-5f6f-5547-ff8e-4a83" + } + ], + "next": "8b5ce66e-80d5-11ed-95e1-0242ac120004-31-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b-d5ec-ae76-2345", + "previous": "9a6a67cc-0c28-11f0-98e9-5e0a5654d7bd-22-3530-2030-3739-5c53-5f6f-5547-ff8e-4a83-869b-c4dd" + }, + "pinnedOutputTabIndex": 0, + "run_through_control": { + "frozen": false, + "read_only": false + }, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "import tempfile\n", + "\n", + "work_dir = tempfile.mkdtemp()\n", + "if default_result_path is None:\n", + " default_result_path = work_dir\n", + "work_dir" + ] + }, + { + "cell_type": "markdown", + "id": "5ad1e5b4-e544-43b9-9afa-b6fd7ece8584", + "metadata": { + "deletable": true, + "editable": true, + "lc_cell_meme": { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-31-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b-d5ec-ae76-2345", + "history": [ + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-1-cb1b", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004", + "previous": null + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-2-cb1b-42bc", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-1-490a", + "previous": null + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-3-cb1b-42bc-e44d", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-2-490a-05fb", + "previous": null + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-4-cb1b-42bc-e44d-4556", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-3-490a-05fb-01ac", + "previous": null + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-5-cb1b-42bc-e44d-4556-863e", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-4-490a-05fb-01ac-29c3", + "previous": null + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-6-cb1b-42bc-e44d-4556-863e-9370", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-5-490a-05fb-01ac-29c3-d4dc", + "previous": null + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-7-cb1b-42bc-e44d-4556-863e-9370-b5f5", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-6-490a-05fb-01ac-29c3-d4dc-cf29", + "previous": null + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-7-490a-05fb-01ac-29c3-d4dc-cf29-6b30", + "previous": null + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-8-490a-05fb-01ac-29c3-d4dc-cf29-6b30-a674", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-8-490a-05fb-01ac-29c3-d4dc-cf29-6b30-a674", + "previous": "0c7d1c72-0c26-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "8b5ce6a0-80d5-11ed-95e1-0242ac120004-8-490a-05fb-01ac-29c3-d4dc-cf29-6b30-a674", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "8b5ce6e6-80d5-11ed-95e1-0242ac120004-8-cf3f-b3ef-db35-57ad-2bcf-ffc2-105c-69a6", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "8b5ce704-80d5-11ed-95e1-0242ac120004-8-134a-19fd-8302-4b9a-fe94-8416-c02c-3d66", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "4a2d93ba-575c-11ee-879c-cee8484f477d-7-ce15-af72-2e99-2376-ed5c-8317-0981", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "ac9f5680-9be1-11ef-bec6-b6d4434572e8-3-0c61-b7da-7291", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "8b5ce722-80d5-11ed-95e1-0242ac120004-8-ba9b-f235-19a9-23b6-7145-b64a-6dfb-09dd", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-8-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-9-2295-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92", + "previous": "f05363a8-0c25-11f0-98e9-5e0a5654d7bd-1-a21c" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-9-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-9-2295-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-10-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-10-2295-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92-f25a", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-10-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-10-2295-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92-f25a", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-10-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-10-2295-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92-f25a", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-1-4202" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-10-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-11-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92-f25a-44f7", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-2-4202-aef0" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-10-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-11-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92-f25a-44f7", + "previous": "a72e1754-0c48-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-10-cb1b-42bc-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-11-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92-f25a-44f7", + "previous": "3bd0c974-0c49-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-12-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11-50c2-120c", + "next": "8b5ce740-80d5-11ed-95e1-0242ac120004-11-9f93-ce95-2df2-6ce8-e56d-28e9-7a4e-fd92-f25a-44f7", + "previous": "a72e1754-0c48-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-12-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11-50c2-120c", + "next": "7258c5f6-0f8b-11f0-935e-6e323efef16c", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-4-4202-aef0-78b6-5218" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-12-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11-50c2-120c", + "next": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-4-4202-aef0-78b6-5218" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-13-4556-863e-9370-b5f5-e658-7a0b-7f11-50c2-120c-62e9", + "next": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-4-4202-aef0-78b6-5218" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-16-b5f5-e658-7a0b-7f11-50c2-120c-62e9-f0ed-0032-2c57", + "next": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-1-b213", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-5-4202-aef0-78b6-5218-939f" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-17-e658-7a0b-7f11-50c2-120c-62e9-f0ed-0032-2c57-2457", + "next": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-4-b213-00e1-d99a-d244", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-8-4202-aef0-78b6-5218-939f-7c1f-36a3-561d" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-21-120c-62e9-f0ed-0032-2c57-2457-0051-5baf-1381-665a", + "next": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-5-b213-00e1-d99a-d244-936b", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-9-4202-aef0-78b6-5218-939f-7c1f-36a3-561d-61b6" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-24-0032-2c57-2457-0051-5baf-1381-665a-d5e9-8d86-8cc0", + "next": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-9-b213-00e1-d99a-d244-936b-b9fe-e496-7385-6aa6", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-13-5218-939f-7c1f-36a3-561d-61b6-8267-4a88-1c97-cfab" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-25-2c57-2457-0051-5baf-1381-665a-d5e9-8d86-8cc0-d3ae", + "next": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-15-11de-e027-5ced-0939-f364-e8a5-98ea-129a-0326-df83", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-16-36a3-561d-61b6-8267-4a88-1c97-cfab-d694-8563-a497" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-27-0051-5baf-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b", + "next": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-16-e027-5ced-0939-f364-e8a5-98ea-129a-0326-df83-3254", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-17-561d-61b6-8267-4a88-1c97-cfab-d694-8563-a497-75b6" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-28-5baf-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b", + "next": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-18-0939-f364-e8a5-98ea-129a-0326-df83-3254-67ea-13d1", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-19-8267-4a88-1c97-cfab-d694-8563-a497-75b6-abbb-1aed" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-29-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b-d5ec", + "next": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-19-f364-e8a5-98ea-129a-0326-df83-3254-67ea-13d1-1128", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-20-4a88-1c97-cfab-d694-8563-a497-75b6-abbb-1aed-b103" + }, + { + "current": "8b5ce66e-80d5-11ed-95e1-0242ac120004-31-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b-d5ec-ae76-2345", + "next": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-20-e8a5-98ea-129a-0326-df83-3254-67ea-13d1-1128-ef0b", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-21-1c97-cfab-d694-8563-a497-75b6-abbb-1aed-b103-5fd5" + } + ], + "next": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-22-129a-0326-df83-3254-67ea-13d1-1128-ef0b-4997-89af", + "previous": "4f1d97fa-0c26-11f0-98e9-5e0a5654d7bd-23-d694-8563-a497-75b6-abbb-1aed-b103-5fd5-3cf4-b14a" + }, + "pinnedOutputTabIndex": 0, + "run_through_control": { + "frozen": false, + "read_only": false + }, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "source": [ + "# GakuNinRDM 総合テスト [機関ストレージのクォータ]\n", + "\n", + "- サブシステム名: 機関ストレージのクォータ\n", + "- ページ/アドオン: 機関ストレージのクォータ\n", + "- 機能分類: 機関ストレージのクォータ\n", + "- シナリオ名: *\n", + "- 用意するテストデータ: アカウント(クォータテストユーザー1), アカウント(統合管理者)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4d89a6c3-cb47-4206-b2ce-5527260dd3e9", + "metadata": { + "deletable": true, + "lc_cell_meme": { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-22-129a-0326-df83-3254-67ea-13d1-1128-ef0b-4997-89af", + "execution_end_time": "2025-04-02T06:31:11.748Z", + "history": [ + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd", + "next": "fc1e9000-ecda-11ef-b381-0242ac120006-8-ad5a-1453-986a-418b-269a-3f21-466e-058e", + "previous": "8b87efd0-f991-11ef-a92d-0242ac120006-5-ccde-2dab-8cb6-87a2-145c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-1-c85a", + "next": "c9853da6-0c6f-11f0-98e9-5e0a5654d7bd", + "previous": "8b87efd0-f991-11ef-a92d-0242ac120006-5-ccde-2dab-8cb6-87a2-145c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "c9853da6-0c6f-11f0-98e9-5e0a5654d7bd-1-f3a3", + "previous": "8b87efd0-f991-11ef-a92d-0242ac120006-6-ccde-2dab-8cb6-87a2-145c-a1d6" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "7258c5f6-0f8b-11f0-935e-6e323efef16c", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-12-e44d-4556-863e-9370-b5f5-e658-7a0b-7f11-50c2-120c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "7258c5f6-0f8b-11f0-935e-6e323efef16c", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "e49811c6-0f8b-11f0-935e-6e323efef16c", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "3e836c18-0c75-11f0-b991-feb16f56f93e-3-b008-e8d0-3f9b", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-4-c85a-d8bf-8dea-ced2", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c-1-2c1c", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-7-c85a-d8bf-8dea-ced2-b6ea-11de-e027", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c-2-2c1c-4f08", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-1-b213" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-7-c85a-d8bf-8dea-ced2-b6ea-11de-e027", + "next": "e4ebb1f2-191b-11f0-ad36-668cb6ddd6b0", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-4-b213-00e1-d99a-d244" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-8-c85a-d8bf-8dea-ced2-b6ea-11de-e027-5ced", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c-5-2c1c-4f08-40b5-cf6e-9e08", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-4-b213-00e1-d99a-d244" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-12-8dea-ced2-b6ea-11de-e027-5ced-0939-f364-e8a5-98ea", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c-6-2c1c-4f08-40b5-cf6e-9e08-8d48", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-5-b213-00e1-d99a-d244-936b" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-15-11de-e027-5ced-0939-f364-e8a5-98ea-129a-0326-df83", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c-10-2c1c-4f08-40b5-cf6e-9e08-8d48-f057-5c33-2714-dcb0", + "previous": "b4bb8a0a-0f8b-11f0-935e-6e323efef16c-9-b213-00e1-d99a-d244-936b-b9fe-e496-7385-6aa6" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-16-e027-5ced-0939-f364-e8a5-98ea-129a-0326-df83-3254", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c-13-cf6e-9e08-8d48-f057-5c33-2714-dcb0-e14d-9444-9b9a", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-24-0032-2c57-2457-0051-5baf-1381-665a-d5e9-8d86-8cc0" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-18-0939-f364-e8a5-98ea-129a-0326-df83-3254-67ea-13d1", + "next": "1945ee16-0f8c-11f0-935e-6e323efef16c-14-9e08-8d48-f057-5c33-2714-dcb0-e14d-9444-9b9a-006d", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-25-2c57-2457-0051-5baf-1381-665a-d5e9-8d86-8cc0-d3ae" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-18-0939-f364-e8a5-98ea-129a-0326-df83-3254-67ea-13d1", + "next": "3e836c18-0c75-11f0-b991-feb16f56f93e-18-8534-be8d-dff3-5553-14d9-9820-e2c8-5e1e-505f-9772", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-27-0051-5baf-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-19-f364-e8a5-98ea-129a-0326-df83-3254-67ea-13d1-1128", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-16-9af2-6a60-d07c-b454-8eb4-684b-5afe-80f4-d3f1-27e6", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-27-0051-5baf-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-19-f364-e8a5-98ea-129a-0326-df83-3254-67ea-13d1-1128", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-17-6a60-d07c-b454-8eb4-684b-5afe-80f4-d3f1-27e6-74fe", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-28-5baf-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-20-e8a5-98ea-129a-0326-df83-3254-67ea-13d1-1128-ef0b", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-18-d07c-b454-8eb4-684b-5afe-80f4-d3f1-27e6-74fe-ddd0", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-28-5baf-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b" + }, + { + "current": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-22-129a-0326-df83-3254-67ea-13d1-1128-ef0b-4997-89af", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-19-b454-8eb4-684b-5afe-80f4-d3f1-27e6-74fe-ddd0-5c50", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-29-1381-665a-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b-d5ec" + } + ], + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-21-684b-5afe-80f4-d3f1-27e6-74fe-ddd0-5c50-23bc-1a52", + "previous": "8b5ce66e-80d5-11ed-95e1-0242ac120004-31-d5e9-8d86-8cc0-d3ae-0c75-c51b-028b-d5ec-ae76-2345" + }, + "pinnedOutputTabIndex": 0, + "run_through_control": { + "frozen": false, + "read_only": false + }, + "scrolled": true + }, + "outputs": [], + "source": [ + "import os\n", + "from scripts.papermillHelpers import gen_run_notebook\n", + "\n", + "def make_result_dir(base_path):\n", + " result_dir = os.path.join(base_path, 'notebooks')\n", + " os.makedirs(result_dir, exist_ok=True)\n", + " return result_dir\n", + "\n", + "result_dir = make_result_dir(default_result_path)\n", + "\n", + "run_notebook = gen_run_notebook(\n", + " result_dir,\n", + " transition_timeout,\n", + " dict(\n", + " admin_rdm_url=admin_rdm_url,\n", + " idp_name_integrated_admin=idp_name_integrated_admin,\n", + " idp_username_integrated_admin=idp_username_integrated_admin,\n", + " idp_password_integrated_admin=idp_password_integrated_admin,\n", + " email_search=email_search,\n", + " production_url_forbidden_patterns=production_url_forbidden_patterns,\n", + " transition_timeout=transition_timeout,\n", + " close_on_fail=close_on_fail,\n", + " ),\n", + " skip_failed_test,\n", + " exclude_notebooks,\n", + ")\n", + "\n", + "result_notebooks = []\n", + "result_dir" + ] + }, + { + "cell_type": "markdown", + "id": "6431b4bc-39a5-4eb6-b4aa-7f34738fff5a", + "metadata": { + "deletable": true, + "editable": true, + "lc_cell_meme": { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-21-ed7d-055c-9a5f-44ba-78c0-1179-2b8e-3b86-c0d8-d28e", + "history": [ + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-2-cde4-bd15", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "previous": "3e836c18-0c75-11f0-b991-feb16f56f93e-3-b008-e8d0-3f9b" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-3-cde4-bd15-47f7", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-4-f4b2-32da-b588-2ea3", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-6-cde4-bd15-47f7-4a43-6e0c-4f72", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-5-f4b2-32da-b588-2ea3-c289", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-4-f4b2-32da-b588-2530" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-8-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-7-f4b2-32da-b588-2530-2362-ef25-d28e" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-11-bd15-47f7-4a43-6e0c-4f72-5d03-228c-c238-dbaa-a842", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-8-f4b2-32da-b588-2530-2362-ef25-d28e-b01d" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-14-6e0c-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-13-2ea3-c289-53e5-31c4-7b04-2eff-2c6e-2ac3-1cfb-6be8", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-12-b588-2530-2362-ef25-d28e-b01d-99fe-df5d-3833-854f" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-15-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-16-31c4-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-15-ef25-d28e-b01d-99fe-df5d-3833-854f-2c66-bd3c-4576" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-15-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-16-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba-e901", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-16-d28e-b01d-99fe-df5d-3833-854f-2c66-bd3c-4576-bfef" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-15-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-16-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba-e901", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-16-d28e-b01d-99fe-df5d-3833-854f-2c66-bd3c-4576-bfef" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-17-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba-78c0-1179", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-17-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-16-d28e-b01d-99fe-df5d-3833-854f-2c66-bd3c-4576-bfef" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-18-c238-dbaa-a842-ed7d-055c-9a5f-44ba-78c0-1179-2b8e", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-19-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723-a940-f244", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-18-99fe-df5d-3833-854f-2c66-bd3c-4576-bfef-2966-38fb" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-19-dbaa-a842-ed7d-055c-9a5f-44ba-78c0-1179-2b8e-3b86", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-20-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723-a940-f244-fd26", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-19-df5d-3833-854f-2c66-bd3c-4576-bfef-2966-38fb-413c" + }, + { + "current": "5111a470-0f8c-11f0-935e-6e323efef16c-21-ed7d-055c-9a5f-44ba-78c0-1179-2b8e-3b86-c0d8-d28e", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-21-1cfb-6be8-e4ee-8c36-b66e-d723-a940-f244-fd26-f2f3", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-20-3833-854f-2c66-bd3c-4576-bfef-2966-38fb-413c-933a" + } + ], + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-23-e4ee-8c36-b66e-d723-a940-f244-fd26-f2f3-0bfc-fa14", + "previous": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-22-2c66-bd3c-4576-bfef-2966-38fb-413c-933a-96fd-b84e" + }, + "pinnedOutputTabIndex": 0, + "run_through_control": { + "frozen": false, + "read_only": false + }, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "parameters" + ] + }, + "source": [ + "## 「再ログイン_NII」テストの実施\n", + "\n", + "テスト「テスト手順-機関ストレージのクォータ-再ログイン_NII」を実施する。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c9c8ea12-759b-4444-8b0f-42e8b575f330", + "metadata": { + "deletable": true, + "lc_cell_meme": { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-23-e4ee-8c36-b66e-d723-a940-f244-fd26-f2f3-0bfc-fa14", + "execution_end_time": "2025-04-02T08:03:37.127Z", + "history": [ + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd", + "next": "fc1e9000-ecda-11ef-b381-0242ac120006-8-ad5a-1453-986a-418b-269a-3f21-466e-058e", + "previous": "c9853da6-0c6f-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-1-f4b2", + "next": "ce8c187e-f991-11ef-a92d-0242ac120006-5-964d-161e-73da-b120-ac56", + "previous": "c9853da6-0c6f-11f0-98e9-5e0a5654d7bd" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "next": "3e836c18-0c75-11f0-b991-feb16f56f93e", + "previous": "c9853da6-0c6f-11f0-98e9-5e0a5654d7bd-1-f3a3" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "next": "3e836c18-0c75-11f0-b991-feb16f56f93e-2-b008-e8d0", + "previous": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "next": "3e836c18-0c75-11f0-b991-feb16f56f93e-2-b008-e8d0", + "previous": "8af0ac06-0c6f-11f0-98e9-5e0a5654d7bd-3-c85a-d8bf-8dea" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "next": "e49811c6-0f8b-11f0-935e-6e323efef16c", + "previous": "3e836c18-0c75-11f0-b991-feb16f56f93e-3-b008-e8d0-3f9b" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "next": "e49811c6-0f8b-11f0-935e-6e323efef16c", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-3-f4b2-32da-b588", + "next": "e49811c6-0f8b-11f0-935e-6e323efef16c", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-4-f4b2-32da-b588-2ea3", + "next": "e49811c6-0f8b-11f0-935e-6e323efef16c", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-1-cde4" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-4-f4b2-32da-b588-2ea3", + "next": "e49811c6-0f8b-11f0-935e-6e323efef16c", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-2-cde4-bd15" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-5-f4b2-32da-b588-2ea3-c289", + "next": "0d1531e8-80d6-11ed-95e1-0242ac120004-12-e81f-4086-98aa-d482-0385-8e2c-9432-9a6a-72f2-3e45", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-2-cde4-bd15" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-8-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04", + "next": "0d1531e8-80d6-11ed-95e1-0242ac120004-13-4086-98aa-d482-0385-8e2c-9432-9a6a-72f2-3e45-343e", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-3-cde4-bd15-47f7" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "0d1531e8-80d6-11ed-95e1-0242ac120004-16-0385-8e2c-9432-9a6a-72f2-3e45-343e-ea1c-9119-c24c", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-6-cde4-bd15-47f7-4a43-6e0c-4f72" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "0f904455-dae3-11ec-9d35-2f7bec2724a5-20-cbc5-a521-c15f-b883-48b3-9d46-065e-f53e-1db9-bf2c", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "9598145a-f29d-11ea-b359-0a58a9feac02-27-0b62-1f07-dfea-e942-8adf-0009-1540-66e7-874f-5bc7", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "adbcf366-e5d6-11eb-941a-0a58a9feac02-25-336f-8de5-90ce-a3b5-a12d-937a-4360-886a-c26e-02f9", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "d335d3ec-80d5-11ed-95e1-0242ac120004-15-e073-8605-4483-934f-f6a6-d120-39e8-923e-1374-45bf", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "d335d464-80d5-11ed-95e1-0242ac120004-15-17d2-51dc-b14f-3876-17a3-6132-809d-8ea5-16f0-dc33", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "ee1320a8-0c28-11f0-98e9-5e0a5654d7bd-7-534f-ca98-0639-fd50-4b19-65a8-2db2", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "fa034c80-0c28-11f0-98e9-5e0a5654d7bd-6-61c8-3dff-8f8a-2237-1cfd-9257", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "17cc442e-0c29-11f0-98e9-5e0a5654d7bd-7-e886-de07-db5b-bc04-f477-8539-894f", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "1de94a14-0c29-11f0-98e9-5e0a5654d7bd-6-a479-3f2b-1422-f712-3b8b-f1e8", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "2840f6ba-0c29-11f0-98e9-5e0a5654d7bd-7-f26a-794a-d7be-5285-ae4d-9866-9a9d", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "3b9069e4-0c29-11f0-98e9-5e0a5654d7bd-6-9cb1-5973-c277-2053-1b0a-1bcc", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "8a8313f4-0c46-11f0-98e9-5e0a5654d7bd-6-1391-2434-3533-a3c9-7ec4-cc88", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "8a9be6c2-0c46-11f0-98e9-5e0a5654d7bd-5-575f-1d40-14d8-77f1-f119", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "fc8a6054-0c5c-11f0-98e9-5e0a5654d7bd-6-63e2-6c8a-0237-74e3-a90f-e71a", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "0cd70764-0c5d-11f0-98e9-5e0a5654d7bd-5-9bdf-ef38-b5d0-1868-6e51", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "0d1531e8-80d6-11ed-95e1-0242ac120004-15-d482-0385-8e2c-9432-9a6a-72f2-e590-6280-8f44-4258", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "0d153210-80d6-11ed-95e1-0242ac120004-15-f333-e27b-a86e-3653-5c2a-fa15-d3c9-8f37-c6be-0edc", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "41ca8840-0c28-11f0-98e9-5e0a5654d7bd-7-1403-a376-dc1e-e116-9124-5c27-100b", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "49f48492-1c24-11f0-baf6-eaf1011eb67f", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-9-f4b2-32da-b588-2ea3-c289-53e5-31c4-7b04-2eff", + "next": "49f48492-1c24-11f0-baf6-eaf1011eb67f", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-13-2ea3-c289-53e5-31c4-7b04-2eff-2c6e-2ac3-1cfb-6be8", + "next": "49f48492-1c24-11f0-baf6-eaf1011eb67f-1-e4e3", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-7-cde4-bd15-47f7-4a43-6e0c-4f72-5d03" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-16-31c4-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e", + "next": "49f48492-1c24-11f0-baf6-eaf1011eb67f-5-e4e3-bf8a-77f2-63dd-03e6", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-11-bd15-47f7-4a43-6e0c-4f72-5d03-228c-c238-dbaa-a842" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-17-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723", + "next": "49f48492-1c24-11f0-baf6-eaf1011eb67f-8-e4e3-bf8a-77f2-63dd-03e6-1500-5d7c-d7c6", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-14-6e0c-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-17-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723", + "next": "49f48492-1c24-11f0-baf6-eaf1011eb67f-9-e4e3-bf8a-77f2-63dd-03e6-1500-5d7c-d7c6-4682", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-16-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba-e901" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-17-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723", + "next": "49f48492-1c24-11f0-baf6-eaf1011eb67f-9-e4e3-bf8a-77f2-63dd-03e6-1500-5d7c-d7c6-4682", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-16-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba-e901" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-17-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-17-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba-e901-4cde", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-15-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-17-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-18-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723-4e38", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-15-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-17-7b04-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723", + "next": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-18-2eff-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723-4e38", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-15-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-19-2c6e-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723-a940-f244", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-17-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba-e901-4cde", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-15-4f72-5d03-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-20-2ac3-1cfb-6be8-e4ee-8c36-b66e-d723-a940-f244-fd26", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-19-dbaa-a842-ed7d-055c-9a5f-44ba-e901-4cde-a657-8454", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-17-228c-c238-dbaa-a842-ed7d-055c-9a5f-44ba-78c0-1179" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-21-1cfb-6be8-e4ee-8c36-b66e-d723-a940-f244-fd26-f2f3", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-20-a842-ed7d-055c-9a5f-44ba-e901-4cde-a657-8454-da06", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-18-c238-dbaa-a842-ed7d-055c-9a5f-44ba-78c0-1179-2b8e" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-23-e4ee-8c36-b66e-d723-a940-f244-fd26-f2f3-0bfc-fa14", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-21-ed7d-055c-9a5f-44ba-e901-4cde-a657-8454-da06-866a", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-19-dbaa-a842-ed7d-055c-9a5f-44ba-78c0-1179-2b8e-3b86" + }, + { + "current": "9954a6fc-0c70-11f0-98e9-5e0a5654d7bd-23-e4ee-8c36-b66e-d723-a940-f244-fd26-f2f3-0bfc-fa14", + "next": "5111a470-0f8c-11f0-935e-6e323efef16c-23-9a5f-44ba-e901-4cde-a657-8454-da06-866a-6cf4-7e0f", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-21-ed7d-055c-9a5f-44ba-78c0-1179-2b8e-3b86-c0d8-d28e" + } + ], + "next": "ce8c187e-f991-11ef-a92d-0242ac120006-29-a486-95d1-c1d7-b179-dd9b-42cf-c380-d863-d4c0-88d3", + "previous": "5111a470-0f8c-11f0-935e-6e323efef16c-21-ed7d-055c-9a5f-44ba-78c0-1179-2b8e-3b86-c0d8-d28e" + }, + "pinnedOutputTabIndex": 0, + "run_through_control": { + "frozen": false, + "read_only": false + }, + "slideshow": { + "slide_type": "" + } + }, + "outputs": [], + "source": [ + "result_notebooks.append(run_notebook(\n", + " 'テスト手順-機関ストレージのクォータ-再ログイン_NII.ipynb',\n", + " dict(\n", + " rdm_url=rdm_url,\n", + " idp_name_quota_test_1=idp_name_quota_test_1,\n", + " idp_username_quota_test_1=idp_username_quota_test_1,\n", + " idp_password_quota_test_1=idp_password_quota_test_1,\n", + " target_organization=target_organization,\n", + " )\n", + "))\n", + "result_notebooks[-1]" + ] + }, + { + "cell_type": "markdown", + "id": "71f0108f", + "metadata": {}, + "source": [ + "## 「再ログイン_Institutions」テストの実施\n", + "\n", + "テスト「テスト手順-機関ストレージのクォータ-再ログイン_Institutions」を実施する。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "43489fff", + "metadata": {}, + "outputs": [], + "source": [ + "result_notebooks.append(run_notebook(\n", + " 'テスト手順-機関ストレージのクォータ-再ログイン_Institutions.ipynb',\n", + " dict(\n", + " rdm_url=rdm_url,\n", + " idp_name_quota_test_1=idp_name_quota_test_1,\n", + " idp_username_quota_test_1=idp_username_quota_test_1,\n", + " idp_password_quota_test_1=idp_password_quota_test_1,\n", + " target_organization=target_organization,\n", + " institution_default_max_quota=institution_default_max_quota,\n", + " s3_access_key=s3_access_key,\n", + " s3_secret_key=s3_secret_key,\n", + " s3_bucket=s3_bucket,\n", + " )\n", + "))\n", + "result_notebooks[-1]" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.9" + }, + "lc_notebook_meme": { + "current": "efecb6ea-0f8a-11f0-935e-6e323efef16c", + "lc_server_signature": { + "current": { + "notebook_dir": "/home/jovyan", + "notebook_path": "/取りまとめ-Temporary.ipynb", + "signature_id": "9a64b10a-2271-11f1-9b10-b207bcb1e3f7" + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git "a/\347\265\220\345\220\210\350\251\246\351\250\223-\345\256\237\350\241\214.ipynb" "b/\347\265\220\345\220\210\350\251\246\351\250\223-\345\256\237\350\241\214.ipynb" index 4150927..4104b52 100644 --- "a/\347\265\220\345\220\210\350\251\246\351\250\223-\345\256\237\350\241\214.ipynb" +++ "b/\347\265\220\345\220\210\350\251\246\351\250\223-\345\256\237\350\241\214.ipynb" @@ -691,6 +691,12 @@ "idp_username_project_limit_2 = None\n", "idp_password_project_limit_2 = None\n", "\n", + "# 機関ストレージのクォータテスト専用ユーザー\n", + "# (IdPログインで新規作成され、テスト内でGDPR削除されるため、他のテストと共有しないこと)\n", + "idp_name_quota_test_1 = None\n", + "idp_username_quota_test_1 = None\n", + "idp_password_quota_test_1 = None\n", + "\n", "\n", "s3_access_key_1 = None\n", "s3_secret_access_key_1 = None\n", @@ -792,6 +798,17 @@ "# クォータ設定対象\n", "admin_quota_user_id = 'xxxxx' # target_organizationに所属している必要あり\n", "\n", + "# 機関ストレージのクォータ(再ログインサイクル)テスト用\n", + "# idp_username_quota_test_1 でログインした際にIdPから返されるメールアドレス(Adminのユーザ検索に使用)\n", + "admin_quota_test_email_search = None\n", + "# idp_username_quota_test_1 が所属する機関名(テスト中に機関ストレージをAmazon S3へ切り替え、終了時にNII Storageへ戻す)\n", + "admin_quota_test_target_organization = None\n", + "# 「クォータ一律設定 (GB)」に設定する値(システム既定値100と異なる値)\n", + "admin_quota_test_institution_default_max_quota = 5\n", + "# 破壊的操作(GDPR delete)を含む「機関ストレージのクォータ」テストの実行前チェックに使用する、\n", + "# 本番相当URLパターン(必須。.config.yamlまたはpapermillパラメータで明示的に指定すること)\n", + "admin_quota_test_production_url_forbidden_patterns = None\n", + "\n", "# BinderHubアドオンのテスト\n", "# アドオン追加テストにおいて追加するBinderHubの情報\n", "binderhub_binderhub_url = 'https://example.com/binderhub'\n" @@ -1463,6 +1480,43 @@ " idp_password_integrated_admin = getpass(prompt=f'Password for {idp_username_integrated_admin}@{idp_name_integrated_admin}')" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "55df42c3", + "metadata": {}, + "outputs": [], + "source": [ + "if idp_name_quota_test_1 is None:\n", + " idp_name_quota_test_1 = input(prompt=f'IdP Name for quota test user 1: ')\n", + "if idp_username_quota_test_1 is None:\n", + " idp_username_quota_test_1 = input(prompt=f'Username for {idp_name_quota_test_1} (quota test user 1)')\n", + "if idp_password_quota_test_1 is None:\n", + " idp_password_quota_test_1 = getpass(prompt=f'Password for {idp_username_quota_test_1}@{idp_name_quota_test_1}')\n", + "if admin_quota_test_email_search is None:\n", + " admin_quota_test_email_search = input(prompt='Email address of quota test user 1 (Admin ユーザ検索欄の入力値)')\n", + "if admin_quota_test_target_organization is None:\n", + " admin_quota_test_target_organization = input(prompt='Target organization name for quota test (対象機関名)')\n", + "(len(idp_username_quota_test_1), len(idp_password_quota_test_1))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "acb01775", + "metadata": {}, + "outputs": [], + "source": [ + "if admin_quota_test_production_url_forbidden_patterns is None:\n", + " admin_quota_test_production_url_forbidden_patterns = input(prompt='本番相当環境と判定するURLパターン (カンマ区切り。「機関ストレージのクォータ」テストのGDPR deleteの事前チェックに使用)')\n", + "if isinstance(admin_quota_test_production_url_forbidden_patterns, str):\n", + " admin_quota_test_production_url_forbidden_patterns = [p.strip() for p in admin_quota_test_production_url_forbidden_patterns.split(',') if p.strip()]\n", + "assert admin_quota_test_production_url_forbidden_patterns, (\n", + " 'admin_quota_test_production_url_forbidden_patterns が未設定です。GDPR delete等の破壊的操作を含むテストのため、'\n", + " '本番相当のURLパターンを1つ以上指定してください。'\n", + ")" + ] + }, { "cell_type": "code", "execution_count": 7, @@ -4135,6 +4189,47 @@ "result_notebooks" ] }, + { + "cell_type": "markdown", + "id": "8e04cb48", + "metadata": {}, + "source": [ + "## 管理者機能-機関ストレージのクォータ関連テスト\n", + "\n", + "対象機関の機関ストレージを一時的にAmazon S3へ切り替え、クォータテスト専用ユーザーをGDPR削除するため、他のテストへ影響しないよう最後に実施する。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6cd9f4cf", + "metadata": {}, + "outputs": [], + "source": [ + "if not skip_admin:\n", + " result_notebooks.append(run_notebook(\n", + " result_dir,\n", + " '取りまとめ-機関ストレージのクォータ.ipynb',\n", + " admin_rdm_url=admin_rdm_url,\n", + " idp_name_integrated_admin=idp_name_integrated_admin,\n", + " idp_username_integrated_admin=idp_username_integrated_admin,\n", + " idp_password_integrated_admin=idp_password_integrated_admin,\n", + " idp_name_quota_test_1=idp_name_quota_test_1,\n", + " idp_username_quota_test_1=idp_username_quota_test_1,\n", + " idp_password_quota_test_1=idp_password_quota_test_1,\n", + " email_search=admin_quota_test_email_search,\n", + " production_url_forbidden_patterns=admin_quota_test_production_url_forbidden_patterns,\n", + " target_organization=admin_quota_test_target_organization,\n", + " institution_default_max_quota=admin_quota_test_institution_default_max_quota,\n", + " # 機関ストレージ(Amazon S3)の接続情報は Amazon S3 #1 を流用する\n", + " s3_access_key=s3_access_key_1,\n", + " s3_secret_key=s3_secret_access_key_1,\n", + " s3_bucket=s3_test_bucket_name_1,\n", + " skip_failed_test=skip_failed_test,\n", + " ))\n", + "result_notebooks" + ] + }, { "cell_type": "markdown", "id": "fb4d1c59-a57e-4870-9a53-440fb398ca73",