diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml new file mode 100644 index 00000000..d1b1044a --- /dev/null +++ b/.github/workflows/integration_test.yml @@ -0,0 +1,114 @@ +name: Integration test + +env: + GO_VERSION: 1.23.4 + NODEJS_VERSION: 20.18.2 + PNPM_VERSION: 'latest' + ES_ADMIN_PASSWORD: 'F0r_test_ci' + +on: + pull_request: + +jobs: + integration_test: + runs-on: ubuntu-latest + + steps: + - name: Checkout current repository + uses: actions/checkout@v4 + with: + path: coco + + - name: Move coco to ~/go/src/infini.sh/coco + run: | + mkdir -p ~/go/src/infini.sh + mv ./coco ~/go/src/infini.sh/ + + - name: Set up nodejs toolchain + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODEJS_VERSION }} + + - name: Install pnpm + run: npm install -g pnpm@${{ env.PNPM_VERSION }} + + - name: Check nodejs toolchain + run: node -v && npm -v && pnpm -v + + - name: Set up go toolchain + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + check-latest: false + cache: true + + - name: Clone framework and framework vendor + run: | + git clone https://github.com/infinilabs/framework.git ~/go/src/infini.sh/framework + git clone https://github.com/infinilabs/framework-vendor.git ~/go/src/infini.sh/vendor + + - name: Build Coco Server + working-directory: /home/runner/go/src/infini.sh/coco + run: make build-all + + - name: Set up Easysearch + run: | + mkdir ~/es_install_dir + curl -sSL http://get.infini.cloud | bash -s -- -p easysearch -d ~/es_install_dir -v 1.16.0-20251121-SNAPSHOT + + # Use our config file, which disables security setting + cd ~/es_install_dir && rm ./config/easysearch.yml + cp ~/go/src/infini.sh/coco/tests/assets/easysearch.yml ~/es_install_dir/config/ + + # Create a symlink at the specified path + ln -s ~/go/src/infini.sh/coco/tests/assets/easysearch_snapshot_repository /tmp/easysearch_snapshot_repository + + cd ~/es_install_dir && ./bin/initialize.sh -s + cd ~/es_install_dir && nohup ./bin/easysearch > easysearch.log 2>&1 & + + # Ensure it starts + while ! nc -z 127.0.0.1 9200; do + echo "Easysearch is not up. Will re-check in 5 seconds..." + sleep 5 + done + # Wait until the cluster reports healthy before continuing + while true; do + health=$(curl -s http://127.0.0.1:9200/_cluster/health) + status=$(echo "$health" | python3 -c 'import sys,json; print(json.load(sys.stdin).get("status", ""))') + if [ "$status" = "green" ]; then + echo "Easysearch cluster status is green." + break + fi + echo "Easysearch cluster status is $status. Will re-check in 5 seconds..." + sleep 5 + done + + # Create the snapshot repository that we need + curl -X POST http://127.0.0.1:9200/_snapshot/repo_ezs \ + -H "Content-Type: application/json" \ + -d '{ "type": "fs", "settings": { "location": "/tmp/easysearch_snapshot_repository" } }' \ + -v -o /tmp/restore_output + cat /tmp/restore_output + + + - name: Install Loadgen + run: | + mkdir ~/loadgen_install_dir + curl -sSL http://get.infini.cloud | bash -s -- -p loadgen -d ~/loadgen_install_dir + # Move to binary to /usr/bin so that it is in $PATH + sudo mv ~/loadgen_install_dir/loadgen-linux-* /usr/bin/loadgen + # Make sure it is executable, just in case. + chmod +x /usr/bin/loadgen + # Run it to verify it is installed + loadgen + # Clear the log directory created by Loadgen + rm -r log + + - name: Replace Coco configuration file + working-directory: /home/runner/go/src/infini.sh/coco + run: rm coco.yml && ln -s tests/assets/coco.yml coco.yml + + + - name: Run tests + working-directory: /home/runner/go/src/infini.sh/coco + run: python3 ./tests/assets/run_integration_tests.py \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9a9652b4..de4076ad 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,8 @@ appveyor.yml web/.github/ web/report* log/ +# Loadgen could create data directory +data/ generated_*.go /assets/static.go diff --git a/Makefile b/Makefile index eade9241..68007e58 100755 --- a/Makefile +++ b/Makefile @@ -29,3 +29,6 @@ build-all: init-web-env make build-web make build-widget make build + +int-test: + ./tests/assets/run_integration_tests.py \ No newline at end of file diff --git a/tests/assets/coco.yml b/tests/assets/coco.yml new file mode 100644 index 00000000..e1d334a1 --- /dev/null +++ b/tests/assets/coco.yml @@ -0,0 +1,385 @@ +env: + ES_ENDPOINT: http://localhost:9200 + WEB_BINDING: 0.0.0.0:9000 + API_BINDING: 0.0.0.0:2900 + +coco: + server: + public: false + name: "My Coco Server" + encode_icon_to_base64: false # enable this if coco-server is using self-signed certs +# #[START] for managed mode only, need to configured by coco-server operator +# endpoint: "http://localhost:9001/" +# auth_provider: #config for app to use +# sso: +# url: "http://localhost:9001/#/login" +# #[END] for managed mode only + minimal_client_version: + number: "0.3" + provider: + name: "INFINI Labs" + description: "Coco AI Server - Search, Connect, Collaborate, AI-powered enterprise search, all in one space." + icon: "https://coco.rs/favicon.ico" + website: "https://coco.rs/" + eula: "https://coco.rs/#/terms" + privacy_policy: "https://coco.rs/privacy" + banner: "https://coco.rs/svg/connect.svg" + #[START] for managed mode only, config for coco-server to use + auth_provider: + sso: + url: "/sso/login/cloud?provider=coco-cloud&product=coco" + #[END] for managed mode only + +## Cleanup exists data: +# curl -u admin:45ff432a5428ade77c7b -k -XDELETE https://localhost:9200/_template/coco-search +# curl -u admin:45ff432a5428ade77c7b -k -XDELETE https://localhost:9200/_template/coco +# curl -u admin:45ff432a5428ade77c7b -k -XDELETE https://localhost:9200/_scripts/coco-query-string +# curl -u admin:45ff432a5428ade77c7b -k -XDELETE https://localhost:9200/_scripts/coco-query-string-extra-should +# curl -u admin:45ff432a5428ade77c7b -k -XDELETE https://localhost:9200/coco_* +elastic: + elasticsearch: prod + enabled: true + store: + enabled: false + orm: + enabled: true + index_prefix: "coco_" + override_exists_template: true + index_templates: + "coco-search": | + { + "order": 10, + "index_patterns": [ + "coco_*" + ], + "settings": { + "index": { + "analysis": { + "char_filter": { + "tsconvert" : { + "type" : "stconvert", + "delimiter" : ",", + "keep_both" : false, + "convert_type" : "t2s" + } + }, + "tokenizer": { + "my_pinyin": { + "type": "pinyin", + "keep_first_letter": true, + "keep_separate_first_letter": true, + "keep_full_pinyin": true, + "keep_original": false, + "limit_first_letter_length": 16, + "lowercase": true + } + }, + "analyzer": { + "pinyin_analyzer": { + "tokenizer": "my_pinyin" + }, + "combined_text_analyzer": { + "char_filter": ["tsconvert"], + "filter": [ + "lowercase", + "asciifolding", + "word_delimiter", + "unique" + ], + "tokenizer": "classic" + } + } + } + } + }, + "mappings": {} + } + + search_templates: + "coco-query-string": | + { + "from": "{{from}}", + "size": "{{size}}", + "_source": { + "includes": [ "{{#source}}","{{.}}","{{/source}}"], + "excludes": [ "payload.*","content" ] + }, + "query": { + "bool": { + "must": {{#toJson}}must_clauses{{/toJson}}, + "must_not": [], + "should": [ + {{#query}} + { + "prefix": { + "{{field}}.keyword": { + "value": "{{query}}", + "boost": 100 + } + } + }, + { + "match_phrase_prefix": { + "{{field}}": { + "query": "{{query}}", + "boost": 50 + } + } + }, + { + "match_phrase": { + "{{field}}": { + "query": "{{query}}", + "boost": 30 + } + } + }, + { + "match": { + "{{field}}": { + "query": "{{query}}", + "fuzziness": "AUTO", + "max_expansions": 10, + "boost": 5, + "prefix_length": 2, + "operator": "and", + "fuzzy_transpositions": true + } + } + }, + { + "query_string": { + "fields": ["{{field}}","{{field}}.keyword^10","combined_fulltext"], + "query": "{{query}}", + "fuzziness": "AUTO", + "fuzzy_prefix_length": 2, + "fuzzy_max_expansions": 10, + "boost": 3, + "default_operator": "AND", + "fuzzy_transpositions": true, + "allow_leading_wildcard": false + } + },{"match": { + "{{field}}.pinyin": { + "query": "{{query}}", + "boost": 4 + } + }} + {{/query}} + ] + } + } + } + "coco-query-string-extra-should": | + { + "from": "{{from}}", + "size": "{{size}}", + "_source": { + "includes": [ "{{#source}}","{{.}}","{{/source}}"], + "excludes": [ "payload.*","content" ] + }, + "query": { + "bool": { + "must": {{#toJson}}must_clauses{{/toJson}}, + "must_not": [], + "should": [ + {{#query}} + { + "prefix": { + "{{field}}.keyword": { + "value": "{{query}}", + "boost": 100 + } + } + }, + { + "match_phrase_prefix": { + "{{field}}": { + "query": "{{query}}", + "boost": 50 + } + } + }, + { + "match_phrase": { + "{{field}}": { + "query": "{{query}}", + "boost": 30 + } + } + }, + { + "match": { + "{{field}}": { + "query": "{{query}}", + "fuzziness": "AUTO", + "max_expansions": 10, + "prefix_length": 2, + "boost": 5, + "fuzzy_transpositions": true + } + } + }, + { + "query_string": { + "fields": ["{{field}}","{{field}}.keyword^10","combined_fulltext"], + "query": "{{query}}", + "fuzziness": "AUTO", + "fuzzy_prefix_length": 2, + "default_operator": "AND", + "boost": 3, + "fuzzy_max_expansions": 10, + "fuzzy_transpositions": true, + "allow_leading_wildcard": false + } + },{"match": { + "{{field}}.pinyin": { + "query": "{{query}}", + "boost": 4 + } + }} + {{/query}} + ,{{#toJson}}extra_should_clauses{{/toJson}} + ] + } + } + } + +elasticsearch: + - name: prod + enabled: true + endpoints: + - $[[env.ES_ENDPOINT]] + discovery: + enabled: false + +api: + enabled: true + websocket: + enabled: false + network: + binding: $[[env.API_BINDING]] + +web: + enabled: true + embedding_api: false + network: + binding: $[[env.WEB_BINDING]] + tls: + enabled: false + skip_insecure_verify: true + default_domain: "localhost:2900" + # default_domain: "api.coco.rs" + auto_issue: + enabled: false + email: "hello@infinilabs.com" + include_default_domain: true + domains: + - "www.coco.rs" + provider: + tencent_dns: + secret_id: $[[keystore.TENCENT_DNS_ID]] #./bin/coco keystore add TENCENT_DNS_ID + secret_key: $[[keystore.TENCENT_DNS_KEY]] #./bin/coco keystore add TENCENT_DNS_KEY + security: + enabled: true + managed: false #remote managed instance + authentication: + oauth: + cloud: + enabled: true + client_secret: "999999" + authorize_url: "http://localhost:9000/oauth/authorize" + token_url: "http://localhost:9000/oauth/token" + profile_url: "http://localhost:9000/account/profile" + redirect_url: "http://localhost:9001/sso/callback/cloud" + success_page: "/#/home" + failed_page: "/#/login" + scopes: [ "openid","email","profile"] + +##background jobs +pipeline: + - name: enrich_documents + auto_start: false + keep_running: true + processor: + - consumer: + auto_commit_offset: true + queue_selector: + keys: + - indexing_documents + consumer: + group: enriched_documents + fetch_max_messages: 10 + processor: + - document_summarization: + model: $[[env.ENRICHMENT_MODEL]] + input_queue: "indexing_documents" + min_input_document_length: 500 + output_queue: + name: "enriched_documents" + label: + tag: "enriched" + + - name: merge_documents + auto_start: true + keep_running: true + processor: + - indexing_merge: + input_queue: "indexing_documents" +# input_queue: "enriched_documents" + idle_timeout_in_seconds: 1 + elasticsearch: "prod" + index_name: "coco_document-v2" + key_field: "id" + output_queue: + name: "merged_documents" + label: + tag: "merged" + worker_size: 1 + bulk_size_in_kb: 10240 + - name: ingest_documents + auto_start: true + keep_running: true + processor: + - bulk_indexing: + bulk: + compress: true + batch_size_in_mb: 10 + batch_size_in_docs: 10240 + consumer: + fetch_max_messages: 100 + queues: + type: indexing_merge + tag: "merged" + - name: connector_dispatcher + auto_start: true + keep_running: true + singleton: true + retry_delay_in_ms: 10000 + processor: + - connector_dispatcher: + max_running_timeout_in_seconds: 1200 +# pipelines_in_sync: true + +http_client: + default: + proxy: + enabled: false + default_config: + http_proxy: http://127.0.0.1:7890 + socket5_proxy: socks5://127.0.0.1:7890 + override_system_proxy_env: true #override system proxy's environment settings with this proxy settings + permitted: + - "google.com" + denied: + - "localhost" + - "www.yuque.com" + - "yuque.com" + - "infinilabs.com" + - "api.coco.rs" + - "dashscope.aliyuncs.com" + domains: + "github.com": + http_proxy: http://127.0.0.1:7890 + socket5_proxy: socks5://127.0.0.1:7890 + diff --git a/tests/assets/easysearch.yml b/tests/assets/easysearch.yml new file mode 100644 index 00000000..95a95af6 --- /dev/null +++ b/tests/assets/easysearch.yml @@ -0,0 +1,61 @@ +path.repo: '/tmp/easysearch_snapshot_repository' + +security.enabled: false +security.audit.type: noop +security.ssl.transport.cert_file: instance.crt +security.ssl.transport.key_file: instance.key +security.ssl.transport.ca_file: ca.crt +security.ssl.transport.skip_domain_verify: true +security.ssl.http.enabled: true +security.ssl.http.cert_file: instance.crt +security.ssl.http.key_file: instance.key +security.ssl.http.ca_file: ca.crt +security.ssl.http.enabled_ciphers: + - "TLS_AES_128_GCM_SHA256" + - "TLS_AES_256_GCM_SHA384" + - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" +security.ssl.http.enabled_protocols: + - "TLSv1.2" + - "TLSv1.3" +security.ssl.transport.enabled_ciphers: + - "TLS_AES_128_GCM_SHA256" + - "TLS_AES_256_GCM_SHA384" + - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" +security.ssl.transport.enabled_protocols: + - "TLSv1.2" + - "TLSv1.3" + +security.allow_default_init_securityindex: true + +security.nodes_dn: + - 'CN=infini.cloud,OU=UNIT,O=ORG,L=NI,ST=FI,C=IN' + +security.restapi.roles_enabled: [ "superuser", "security_rest_api_access", "security" ] + +security.system_indices.enabled: true +security.ssl.http.clientauth_mode: OPTIONAL +security.system_indices.indices: [".infini-*"] + +#for admin dn +## specify admin certs to operate against system indices, basic_auth is not required +## curl -k --cert config/admin.crt --key config/admin.key -XDELETE 'https://localhost:9200/.infini-*/' +security.authcz.admin_dn: + - 'CN=admin.infini.cloud,OU=UNIT,O=ORG,L=NI,ST=FI,C=IN' + +# Password strength rules for password complexity. +# If you want to set up password strength rules for internal users, you can use the below settings for it. +# Password validation rules can be configured through regex. In the below regex example, a user must need +# a password with minimum 8 characters length and must include minimum one uppercase, one lower case, one digit, and one special character. +# And a custom error message can be configured, in case if a password is not created according to the password strength rule. +security.restapi.password_validation_regex: '(?=.*[A-Z])(?=.*[^a-zA-Z\d])(?=.*[0-9])(?=.*[a-z]).{8,}' +security.restapi.password_validation_error_message: "A password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, one digit, and one special character." diff --git a/tests/assets/easysearch_snapshot_repository/index-15 b/tests/assets/easysearch_snapshot_repository/index-15 new file mode 100644 index 00000000..d1a7112a --- /dev/null +++ b/tests/assets/easysearch_snapshot_repository/index-15 @@ -0,0 +1 @@ +{"snapshots":[{"name":"prev_coco_indices","uuid":"33WZyZ1UQLypqhBOjQwgmQ","state":1,"index_metadata_lookup":{"RqtlE1cJQf6uAxwChVSLFA":"HrI9raD3QO2dI5ChrwlBPA-_na_-1-1-1","uAg9w7tDR6qyVmTLn8RmCA":"Kh7puiwITwOuBXG608LwFg-_na_-1-2-1","8d9Lxcw8QOCf31aTyCkkQw":"TXxx7xQoS4mdT1ZDlSqgeQ-_na_-1-1-1","UMTFR_1qRLGwbyPX-jesHg":"jbbJ6ZkyQwW9QwPSiyU1TQ-_na_-1-2-1","yI3EBpqCScqQ2Sxg8Hvi7Q":"CaVUlNzjT-CTVvtKuUbIIw-_na_-1-3-1","pse6TUNcQPyJ_yMad2ClYQ":"YWTYSXUNRHSSBxzL9Hr-4w-_na_-1-1-1","yAn27kDrQma3mjVS9VTUkw":"Bh5Vapz2TDGRAETs9l57XQ-_na_-1-1-1","j6mT98vJQ4OEvJAOIdBWLA":"thfLl6unSNy4JteUyXD1nw-_na_-1-3-1","Rg_EJy9rQS2_Cld8aNYx7Q":"ZN6XZE8rRw64OqVZvJX5LA-_na_-1-2-1","0qBEloR4QPmKa84W-Ue24w":"rE7rVE9USAiJZ5NAf4hr0w-_na_-1-1-1","oy2sh9SZS8KtAN5ps0ELAQ":"I5h8_7_sSW-yLbnA1to0Ww-_na_-1-2-1","vvVaz64ZTNOPihaPXCcRQw":"oU749FkATNaW-B-3cDC_Vw-_na_-1-1-1","NEFn1Z5rSWmIYaVPncLUSQ":"lzUiPqheSO6muhTbRm0yvA-_na_-1-1-1","QYpTFIF7Q2m85_XXn343yg":"Ch1_IYmZRf2lMmd0oYq8eQ-_na_-1-1-1","BBH7jZ9xTfKeL8vKQvunYw":"xqaJ4y9FSSKfZXZgKdx20w-_na_-1-1-1","pP3fIGXzQui23NLKOphyZQ":"73yYBaZxSbCEMM8m54CoNg-_na_-1-1-1","3XyguCqFTC2UgCd3HDb_bQ":"3rs5v7ZOQwGeSuBLBsKCGw-_na_-1-1-1","bA1k7vp2SCmsJARJEqC9vg":"kHzW4LobSZWKL4USRJw8sg-_na_-1-1-1","5h-TFYJtRrqkopPi0a4brA":"n3YThHMzSM2qvWbYeQ863A-_na_-1-2-1","VpuJaCLFTaCQVBt1bXrllQ":"4YaNHeS7SNOnOHWDMH-2YA-_na_-1-1-1","m_qyTs5yTvCGmY7n4Z5XvA":"rT5P6Ly8RlK6CPBOyTLJmg-_na_-1-2-1","AlE4Q9U9TOe53g11bKTovA":"aq7XVhYJQKKLean_hCz48w-_na_-1-1-1","qPFbyW2mSdGX_P8QqA7HOA":"Dibj2lysTbGo4Q2170I9GQ-_na_-1-1-1","wUY2GQixQFicwBoOvPOQWQ":"e9o3qkiPRPiHZDkI94Lrgg-_na_-1-1-1"},"version":"1.16.0"},{"name":"coco_indices","uuid":"zWoW3T70Td2_a-TJ7kpJEA","state":1,"index_metadata_lookup":{"RqtlE1cJQf6uAxwChVSLFA":"bswcLo-nSbKOii31JkE3hQ-_na_-1-1-1","uAg9w7tDR6qyVmTLn8RmCA":"QdXGVNGGTBy7F2G3T7oxcw-_na_-1-2-1","8d9Lxcw8QOCf31aTyCkkQw":"MgYWbNVCRtuqB-gfOz-8pw-_na_-1-1-1","yI3EBpqCScqQ2Sxg8Hvi7Q":"yWTqSdc4REu-xHw7nM8txw-_na_-1-3-1","UMTFR_1qRLGwbyPX-jesHg":"Ufyb8Kg_SeKELZxHtDmb_w-_na_-1-2-1","pse6TUNcQPyJ_yMad2ClYQ":"Kb95oxX-Sci3vU9sr3sH0A-_na_-1-1-1","yAn27kDrQma3mjVS9VTUkw":"ISlqDrJ9QYaK8eHwTsFjAw-_na_-1-1-1","Rg_EJy9rQS2_Cld8aNYx7Q":"_J9EQsZyRJW68NNMi3Nvcw-_na_-1-2-1","j6mT98vJQ4OEvJAOIdBWLA":"L5Waoz7ESN6CFDZlMUY-eQ-_na_-1-3-1","0qBEloR4QPmKa84W-Ue24w":"ddyWf8nOQA-b0SPszZ2W3w-_na_-1-1-1","oy2sh9SZS8KtAN5ps0ELAQ":"dDpr9FRNR36WBufQaGnrBQ-_na_-1-2-1","vvVaz64ZTNOPihaPXCcRQw":"8ppMXOD-RmyvySJwlCFnJg-_na_-1-1-1","NEFn1Z5rSWmIYaVPncLUSQ":"i5n-nXH_R5KpuI3LTvw0qg-_na_-1-1-1","QYpTFIF7Q2m85_XXn343yg":"GKUuRLXhQ-itP9InIjyKZQ-_na_-1-1-1","BBH7jZ9xTfKeL8vKQvunYw":"nh3g6z7nRbm3hamttYLLeQ-_na_-1-1-1","5h-TFYJtRrqkopPi0a4brA":"_1-LJZYSTu-DSP3U1fLm0g-_na_-1-2-1","VpuJaCLFTaCQVBt1bXrllQ":"ALVDI7DkQRiRAPgUYafbEQ-_na_-1-1-1","m_qyTs5yTvCGmY7n4Z5XvA":"0XE3sLIaRxuO0MFQTyUPPA-_na_-1-2-1","AlE4Q9U9TOe53g11bKTovA":"Y5z3qC8rR4qBMxjOS4h01w-_na_-1-1-1","wUY2GQixQFicwBoOvPOQWQ":"mqV5HdB3Qqy20916yS2cRA-_na_-1-1-1","qPFbyW2mSdGX_P8QqA7HOA":"apXOpMVZSDeEPlEahoRmLQ-_na_-1-1-1"},"version":"1.16.0"}],"indices":{"coco_developer":{"id":"3XyguCqFTC2UgCd3HDb_bQ","snapshots":["33WZyZ1UQLypqhBOjQwgmQ"],"shard_generations":["qE5eAEmXQb-tNNbqoBr9vA"]},"coco_assistant-v2":{"id":"5h-TFYJtRrqkopPi0a4brA","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["1Vvj_glTRW-2BF3ipogR2w"]},"coco_message-v2":{"id":"QYpTFIF7Q2m85_XXn343yg","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["NIc1Y_kUQtKTIMqex15yvQ"]},"coco_activities":{"id":"VpuJaCLFTaCQVBt1bXrllQ","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["MnC0MOFvTNWjYLQyiy2eJw"]},"coco_attachment-v2":{"id":"RqtlE1cJQf6uAxwChVSLFA","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["ep8UUQ9cTZ6aVkCUhJbZ3Q"]},"coco_app-roles":{"id":"Rg_EJy9rQS2_Cld8aNYx7Q","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["JsFs3rsQS1iwQjAF2h3Yvg"]},"coco_cluster":{"id":"vvVaz64ZTNOPihaPXCcRQw","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["q30WmG3ySdW8pUGRFtu4RQ"]},"coco_server-extension":{"id":"bA1k7vp2SCmsJARJEqC9vg","snapshots":["33WZyZ1UQLypqhBOjQwgmQ"],"shard_generations":["l5i_MgLFRXqI-GIOoI2bjQ"]},"coco_connector-v2":{"id":"UMTFR_1qRLGwbyPX-jesHg","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["6LpBnTztRVW1EKxlHtYniA"]},"coco_sharing-record":{"id":"qPFbyW2mSdGX_P8QqA7HOA","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["cmtTJDZkTJmD8Zo0T7K4IQ"]},"coco_metrics":{"id":"pse6TUNcQPyJ_yMad2ClYQ","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["TeoEUdMrQrGsTUGjE_PIMw"]},"coco_external_permission":{"id":"0qBEloR4QPmKa84W-Ue24w","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["_DIesGLoQxeVPuLrUQnhSQ"]},"coco_connector_sync_state-v2":{"id":"BBH7jZ9xTfKeL8vKQvunYw","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["I6PHPFBDQLGP0DI8ef2L4A"]},"coco_model-provider-v2":{"id":"m_qyTs5yTvCGmY7n4Z5XvA","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["buepoj5eT12G5B8ZT5TNug"]},"coco_node":{"id":"8d9Lxcw8QOCf31aTyCkkQw","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["-jYkH-k1SLuzcvxwOqp2Zg"]},"coco_org-principals":{"id":"wUY2GQixQFicwBoOvPOQWQ","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["EjvjCQOUQ1GqJ1ysn5UDdw"]},"coco_mcp-server-v2":{"id":"oy2sh9SZS8KtAN5ps0ELAQ","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["ys1HBUryRQKdg9Gw984oAA"]},"coco_extension":{"id":"pP3fIGXzQui23NLKOphyZQ","snapshots":["33WZyZ1UQLypqhBOjQwgmQ"],"shard_generations":["V75EsTNYR7eKknNTBF6gjw"]},"coco_document-v2":{"id":"yI3EBpqCScqQ2Sxg8Hvi7Q","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["FblUkyb7Q9maqddUKHps0w"]},"coco_session-v2":{"id":"NEFn1Z5rSWmIYaVPncLUSQ","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["N6j1QX6_S6mn2gbJTxmx6w"]},"coco_integration-v2":{"id":"uAg9w7tDR6qyVmTLn8RmCA","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["6OI8oi5KSUertpmzyWZUPA"]},"coco_index":{"id":"AlE4Q9U9TOe53g11bKTovA","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["ktr3MmVhTrCd9LqSNBpDPQ"]},"coco_app-users":{"id":"yAn27kDrQma3mjVS9VTUkw","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["_q5vp5HyTtKX6wyFdwZM6w"]},"coco_datasource-v2":{"id":"j6mT98vJQ4OEvJAOIdBWLA","snapshots":["33WZyZ1UQLypqhBOjQwgmQ","zWoW3T70Td2_a-TJ7kpJEA"],"shard_generations":["Ruy6YRhnTjiqnXRmHQgVbw"]}},"min_version":"7.10.2","index_metadata_identifiers":{"73yYBaZxSbCEMM8m54CoNg-_na_-1-1-1":"i5jAipoBsCT1DoHgmZHy","rE7rVE9USAiJZ5NAf4hr0w-_na_-1-1-1":"hZjAipoBsCT1DoHgmZHt","thfLl6unSNy4JteUyXD1nw-_na_-1-3-1":"gpjAipoBsCT1DoHgmZHq","TXxx7xQoS4mdT1ZDlSqgeQ-_na_-1-1-1":"fJjAipoBsCT1DoHgmZHm","n3YThHMzSM2qvWbYeQ863A-_na_-1-2-1":"jpjAipoBsCT1DoHgmZHy","Ufyb8Kg_SeKELZxHtDmb_w-_na_-1-2-1":"mJiFi5oBsCT1DoHg5JEt","xqaJ4y9FSSKfZXZgKdx20w-_na_-1-1-1":"ipjAipoBsCT1DoHgmZHx","L5Waoz7ESN6CFDZlMUY-eQ-_na_-1-3-1":"mpiFi5oBsCT1DoHg5JEu","mqV5HdB3Qqy20916yS2cRA-_na_-1-1-1":"p5iFi5oBsCT1DoHg5JE4","aq7XVhYJQKKLean_hCz48w-_na_-1-1-1":"kZjAipoBsCT1DoHgmZH2","GKUuRLXhQ-itP9InIjyKZQ-_na_-1-1-1":"oJiFi5oBsCT1DoHg5JEy","Y5z3qC8rR4qBMxjOS4h01w-_na_-1-1-1":"pZiFi5oBsCT1DoHg5JE1","jbbJ6ZkyQwW9QwPSiyU1TQ-_na_-1-2-1":"gJjAipoBsCT1DoHgmZHp","4YaNHeS7SNOnOHWDMH-2YA-_na_-1-1-1":"j5jAipoBsCT1DoHgmZH1","Bh5Vapz2TDGRAETs9l57XQ-_na_-1-1-1":"g5jAipoBsCT1DoHgmZHq","bswcLo-nSbKOii31JkE3hQ-_na_-1-1-1":"lJiFi5oBsCT1DoHg5JEp","ddyWf8nOQA-b0SPszZ2W3w-_na_-1-1-1":"nZiFi5oBsCT1DoHg5JEw","CaVUlNzjT-CTVvtKuUbIIw-_na_-1-3-1":"f5jAipoBsCT1DoHgmZHm","3rs5v7ZOQwGeSuBLBsKCGw-_na_-1-1-1":"jZjAipoBsCT1DoHgmZHy","lzUiPqheSO6muhTbRm0yvA-_na_-1-1-1":"iJjAipoBsCT1DoHgmZHu","MgYWbNVCRtuqB-gfOz-8pw-_na_-1-1-1":"lZiFi5oBsCT1DoHg5JEp","_J9EQsZyRJW68NNMi3Nvcw-_na_-1-2-1":"m5iFi5oBsCT1DoHg5JEu","nh3g6z7nRbm3hamttYLLeQ-_na_-1-1-1":"opiFi5oBsCT1DoHg5JE1","kHzW4LobSZWKL4USRJw8sg-_na_-1-1-1":"jJjAipoBsCT1DoHgmZHy","0XE3sLIaRxuO0MFQTyUPPA-_na_-1-2-1":"pJiFi5oBsCT1DoHg5JE1","HrI9raD3QO2dI5ChrwlBPA-_na_-1-1-1":"fZjAipoBsCT1DoHgmZHm","e9o3qkiPRPiHZDkI94Lrgg-_na_-1-1-1":"kpjAipoBsCT1DoHgmZH2","_1-LJZYSTu-DSP3U1fLm0g-_na_-1-2-1":"o5iFi5oBsCT1DoHg5JE1","Kb95oxX-Sci3vU9sr3sH0A-_na_-1-1-1":"mZiFi5oBsCT1DoHg5JEu","ALVDI7DkQRiRAPgUYafbEQ-_na_-1-1-1":"ppiFi5oBsCT1DoHg5JE1","rT5P6Ly8RlK6CPBOyTLJmg-_na_-1-2-1":"kJjAipoBsCT1DoHgmZH2","I5h8_7_sSW-yLbnA1to0Ww-_na_-1-2-1":"hpjAipoBsCT1DoHgmZHu","ZN6XZE8rRw64OqVZvJX5LA-_na_-1-2-1":"hJjAipoBsCT1DoHgmZHq","8ppMXOD-RmyvySJwlCFnJg-_na_-1-1-1":"oZiFi5oBsCT1DoHg5JEy","Ch1_IYmZRf2lMmd0oYq8eQ-_na_-1-1-1":"iZjAipoBsCT1DoHgmZHu","yWTqSdc4REu-xHw7nM8txw-_na_-1-3-1":"lpiFi5oBsCT1DoHg5JEp","apXOpMVZSDeEPlEahoRmLQ-_na_-1-1-1":"qJiFi5oBsCT1DoHg5JE5","Kh7puiwITwOuBXG608LwFg-_na_-1-2-1":"fpjAipoBsCT1DoHgmZHm","QdXGVNGGTBy7F2G3T7oxcw-_na_-1-2-1":"l5iFi5oBsCT1DoHg5JEp","dDpr9FRNR36WBufQaGnrBQ-_na_-1-2-1":"npiFi5oBsCT1DoHg5JEy","oU749FkATNaW-B-3cDC_Vw-_na_-1-1-1":"h5jAipoBsCT1DoHgmZHu","YWTYSXUNRHSSBxzL9Hr-4w-_na_-1-1-1":"gZjAipoBsCT1DoHgmZHq","Dibj2lysTbGo4Q2170I9GQ-_na_-1-1-1":"k5jAipoBsCT1DoHgmZH2","ISlqDrJ9QYaK8eHwTsFjAw-_na_-1-1-1":"nJiFi5oBsCT1DoHg5JEu","i5n-nXH_R5KpuI3LTvw0qg-_na_-1-1-1":"n5iFi5oBsCT1DoHg5JEy"}} \ No newline at end of file diff --git a/tests/assets/easysearch_snapshot_repository/index.latest b/tests/assets/easysearch_snapshot_repository/index.latest new file mode 100644 index 00000000..933d5532 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/index.latest differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/index-_DIesGLoQxeVPuLrUQnhSQ b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/index-_DIesGLoQxeVPuLrUQnhSQ new file mode 100644 index 00000000..14735b3c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/index-_DIesGLoQxeVPuLrUQnhSQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..b74f81a9 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..b66ddfdc Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/meta-hZjAipoBsCT1DoHgmZHt.dat b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/meta-hZjAipoBsCT1DoHgmZHt.dat new file mode 100644 index 00000000..20714e44 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/meta-hZjAipoBsCT1DoHgmZHt.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/meta-nZiFi5oBsCT1DoHg5JEw.dat b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/meta-nZiFi5oBsCT1DoHg5JEw.dat new file mode 100644 index 00000000..de4803d9 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/0qBEloR4QPmKa84W-Ue24w/meta-nZiFi5oBsCT1DoHg5JEw.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/0/index-qE5eAEmXQb-tNNbqoBr9vA b/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/0/index-qE5eAEmXQb-tNNbqoBr9vA new file mode 100644 index 00000000..7785455a Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/0/index-qE5eAEmXQb-tNNbqoBr9vA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..833006da Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/meta-jZjAipoBsCT1DoHgmZHy.dat b/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/meta-jZjAipoBsCT1DoHgmZHy.dat new file mode 100644 index 00000000..9a2221f2 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/3XyguCqFTC2UgCd3HDb_bQ/meta-jZjAipoBsCT1DoHgmZHy.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__0d8GZlcYTyataemUCcX98g b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__0d8GZlcYTyataemUCcX98g new file mode 100644 index 00000000..5c018736 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__0d8GZlcYTyataemUCcX98g differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__4qCLEtnKSdC_vhGXarDNsA b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__4qCLEtnKSdC_vhGXarDNsA new file mode 100644 index 00000000..b9a33a80 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__4qCLEtnKSdC_vhGXarDNsA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__6AhpVK_cQceEKJDIUdU8nA b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__6AhpVK_cQceEKJDIUdU8nA new file mode 100644 index 00000000..f3602584 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__6AhpVK_cQceEKJDIUdU8nA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__6vOE0ZGDSJ6sfP4B9pKmsQ b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__6vOE0ZGDSJ6sfP4B9pKmsQ new file mode 100644 index 00000000..e8635fb9 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__6vOE0ZGDSJ6sfP4B9pKmsQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__8yux6Qv2Se-RAOPNtg2yCQ b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__8yux6Qv2Se-RAOPNtg2yCQ new file mode 100644 index 00000000..3fb19647 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__8yux6Qv2Se-RAOPNtg2yCQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__A7EA_oLVRlOTjfyXbe22aA b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__A7EA_oLVRlOTjfyXbe22aA new file mode 100644 index 00000000..3ba24c0d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__A7EA_oLVRlOTjfyXbe22aA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__FA3fRBBDSd2dnlAUAF5i3w b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__FA3fRBBDSd2dnlAUAF5i3w new file mode 100644 index 00000000..ac373440 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__FA3fRBBDSd2dnlAUAF5i3w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__KkAGpLuUToiSHpD_W2tJRA b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__KkAGpLuUToiSHpD_W2tJRA new file mode 100644 index 00000000..89014acf Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__KkAGpLuUToiSHpD_W2tJRA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__UNgFwDqsRKqA2TUughF3qA b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__UNgFwDqsRKqA2TUughF3qA new file mode 100644 index 00000000..50c6d862 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__UNgFwDqsRKqA2TUughF3qA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__XHOIk1syQS-KiGfxZgArKw b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__XHOIk1syQS-KiGfxZgArKw new file mode 100644 index 00000000..fe1b2bdc Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__XHOIk1syQS-KiGfxZgArKw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__ZISoGBW7S9eG8FxE5MVzXg b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__ZISoGBW7S9eG8FxE5MVzXg new file mode 100644 index 00000000..e7b5d471 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__ZISoGBW7S9eG8FxE5MVzXg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__eDGj5a3rTFqsxd4nkp2FbA b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__eDGj5a3rTFqsxd4nkp2FbA new file mode 100644 index 00000000..2fe2c0ff Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__eDGj5a3rTFqsxd4nkp2FbA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__iWendTkhTJOUrjH_UtvHQA b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__iWendTkhTJOUrjH_UtvHQA new file mode 100644 index 00000000..d3457465 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__iWendTkhTJOUrjH_UtvHQA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__icqtCAbkQ7mGj-x5YaY2zw b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__icqtCAbkQ7mGj-x5YaY2zw new file mode 100644 index 00000000..f1d7e4dd Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__icqtCAbkQ7mGj-x5YaY2zw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__jt3zvvLmSSOCsgiP79dfkg b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__jt3zvvLmSSOCsgiP79dfkg new file mode 100644 index 00000000..28cd3c24 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__jt3zvvLmSSOCsgiP79dfkg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__kMfGy3UXTy6RksG6ubyDzg b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__kMfGy3UXTy6RksG6ubyDzg new file mode 100644 index 00000000..7e015180 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__kMfGy3UXTy6RksG6ubyDzg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__m0TbAlntTdCsivJNBhWUzA b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__m0TbAlntTdCsivJNBhWUzA new file mode 100644 index 00000000..01721c71 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/__m0TbAlntTdCsivJNBhWUzA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/index-1Vvj_glTRW-2BF3ipogR2w b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/index-1Vvj_glTRW-2BF3ipogR2w new file mode 100644 index 00000000..a32d18fd Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/index-1Vvj_glTRW-2BF3ipogR2w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..25472d77 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..9df2ab73 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/meta-jpjAipoBsCT1DoHgmZHy.dat b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/meta-jpjAipoBsCT1DoHgmZHy.dat new file mode 100644 index 00000000..20c588e8 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/meta-jpjAipoBsCT1DoHgmZHy.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/meta-o5iFi5oBsCT1DoHg5JE1.dat b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/meta-o5iFi5oBsCT1DoHg5JE1.dat new file mode 100644 index 00000000..91322f53 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/5h-TFYJtRrqkopPi0a4brA/meta-o5iFi5oBsCT1DoHg5JE1.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/index--jYkH-k1SLuzcvxwOqp2Zg b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/index--jYkH-k1SLuzcvxwOqp2Zg new file mode 100644 index 00000000..b0cf0763 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/index--jYkH-k1SLuzcvxwOqp2Zg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..43f93054 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..15bcdfbd Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/meta-fJjAipoBsCT1DoHgmZHm.dat b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/meta-fJjAipoBsCT1DoHgmZHm.dat new file mode 100644 index 00000000..dfbfe99d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/meta-fJjAipoBsCT1DoHgmZHm.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/meta-lZiFi5oBsCT1DoHg5JEp.dat b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/meta-lZiFi5oBsCT1DoHg5JEp.dat new file mode 100644 index 00000000..2cadea92 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/8d9Lxcw8QOCf31aTyCkkQw/meta-lZiFi5oBsCT1DoHg5JEp.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/index-ktr3MmVhTrCd9LqSNBpDPQ b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/index-ktr3MmVhTrCd9LqSNBpDPQ new file mode 100644 index 00000000..74741121 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/index-ktr3MmVhTrCd9LqSNBpDPQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..f4f88339 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..475a90e7 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/meta-kZjAipoBsCT1DoHgmZH2.dat b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/meta-kZjAipoBsCT1DoHgmZH2.dat new file mode 100644 index 00000000..5fdba31b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/meta-kZjAipoBsCT1DoHgmZH2.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/meta-pZiFi5oBsCT1DoHg5JE1.dat b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/meta-pZiFi5oBsCT1DoHg5JE1.dat new file mode 100644 index 00000000..859e94db Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/AlE4Q9U9TOe53g11bKTovA/meta-pZiFi5oBsCT1DoHg5JE1.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/index-I6PHPFBDQLGP0DI8ef2L4A b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/index-I6PHPFBDQLGP0DI8ef2L4A new file mode 100644 index 00000000..0c2a9592 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/index-I6PHPFBDQLGP0DI8ef2L4A differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..0daf7f16 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..53cb9974 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/meta-ipjAipoBsCT1DoHgmZHx.dat b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/meta-ipjAipoBsCT1DoHgmZHx.dat new file mode 100644 index 00000000..4d2930e1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/meta-ipjAipoBsCT1DoHgmZHx.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/meta-opiFi5oBsCT1DoHg5JE1.dat b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/meta-opiFi5oBsCT1DoHg5JE1.dat new file mode 100644 index 00000000..91ef7beb Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/BBH7jZ9xTfKeL8vKQvunYw/meta-opiFi5oBsCT1DoHg5JE1.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/index-N6j1QX6_S6mn2gbJTxmx6w b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/index-N6j1QX6_S6mn2gbJTxmx6w new file mode 100644 index 00000000..28818771 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/index-N6j1QX6_S6mn2gbJTxmx6w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..7f1c0e25 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..944fadbf Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/meta-iJjAipoBsCT1DoHgmZHu.dat b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/meta-iJjAipoBsCT1DoHgmZHu.dat new file mode 100644 index 00000000..d7f72f8e Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/meta-iJjAipoBsCT1DoHgmZHu.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/meta-n5iFi5oBsCT1DoHg5JEy.dat b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/meta-n5iFi5oBsCT1DoHg5JEy.dat new file mode 100644 index 00000000..1cf4ecf1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/NEFn1Z5rSWmIYaVPncLUSQ/meta-n5iFi5oBsCT1DoHg5JEy.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/index-NIc1Y_kUQtKTIMqex15yvQ b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/index-NIc1Y_kUQtKTIMqex15yvQ new file mode 100644 index 00000000..24bdcd2a Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/index-NIc1Y_kUQtKTIMqex15yvQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..7e549279 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..fa87fbde Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/meta-iZjAipoBsCT1DoHgmZHu.dat b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/meta-iZjAipoBsCT1DoHgmZHu.dat new file mode 100644 index 00000000..a749395d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/meta-iZjAipoBsCT1DoHgmZHu.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/meta-oJiFi5oBsCT1DoHg5JEy.dat b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/meta-oJiFi5oBsCT1DoHg5JEy.dat new file mode 100644 index 00000000..16171170 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/QYpTFIF7Q2m85_XXn343yg/meta-oJiFi5oBsCT1DoHg5JEy.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__Byio2SXERfqgrl3OZUcZRQ b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__Byio2SXERfqgrl3OZUcZRQ new file mode 100644 index 00000000..0a28dba6 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__Byio2SXERfqgrl3OZUcZRQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__DOh97GG4ROCd-e8zbP_7rw b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__DOh97GG4ROCd-e8zbP_7rw new file mode 100644 index 00000000..ff6e17ea Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__DOh97GG4ROCd-e8zbP_7rw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__Nup3b-mkTMWnndDfogNIQQ b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__Nup3b-mkTMWnndDfogNIQQ new file mode 100644 index 00000000..243ea496 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__Nup3b-mkTMWnndDfogNIQQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/___PfjLw_0Rh-is7MbaT-UpQ b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/___PfjLw_0Rh-is7MbaT-UpQ new file mode 100644 index 00000000..158a991b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/___PfjLw_0Rh-is7MbaT-UpQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__dGlwITC0T6i-cOJkJV20ew b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__dGlwITC0T6i-cOJkJV20ew new file mode 100644 index 00000000..130adc33 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__dGlwITC0T6i-cOJkJV20ew differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__fO_u0zlJRa-OgoIjVNswRQ b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__fO_u0zlJRa-OgoIjVNswRQ new file mode 100644 index 00000000..5979b07c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__fO_u0zlJRa-OgoIjVNswRQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__iYao-ZLiRS2xNsn6lwZ-2w b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__iYao-ZLiRS2xNsn6lwZ-2w new file mode 100644 index 00000000..45a7b76d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__iYao-ZLiRS2xNsn6lwZ-2w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__z3voE0kTSGKOVSyZ0u2j_Q b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__z3voE0kTSGKOVSyZ0u2j_Q new file mode 100644 index 00000000..ba4cc0e4 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/__z3voE0kTSGKOVSyZ0u2j_Q differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/index-JsFs3rsQS1iwQjAF2h3Yvg b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/index-JsFs3rsQS1iwQjAF2h3Yvg new file mode 100644 index 00000000..eddffb38 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/index-JsFs3rsQS1iwQjAF2h3Yvg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..81b709b7 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..ea8367c2 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/meta-hJjAipoBsCT1DoHgmZHq.dat b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/meta-hJjAipoBsCT1DoHgmZHq.dat new file mode 100644 index 00000000..11a32ee4 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/meta-hJjAipoBsCT1DoHgmZHq.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/meta-m5iFi5oBsCT1DoHg5JEu.dat b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/meta-m5iFi5oBsCT1DoHg5JEu.dat new file mode 100644 index 00000000..747485bb Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/Rg_EJy9rQS2_Cld8aNYx7Q/meta-m5iFi5oBsCT1DoHg5JEu.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/index-ep8UUQ9cTZ6aVkCUhJbZ3Q b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/index-ep8UUQ9cTZ6aVkCUhJbZ3Q new file mode 100644 index 00000000..6972fe50 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/index-ep8UUQ9cTZ6aVkCUhJbZ3Q differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..bce22765 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..aad4632f Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/meta-fZjAipoBsCT1DoHgmZHm.dat b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/meta-fZjAipoBsCT1DoHgmZHm.dat new file mode 100644 index 00000000..9a323c92 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/meta-fZjAipoBsCT1DoHgmZHm.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/meta-lJiFi5oBsCT1DoHg5JEp.dat b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/meta-lJiFi5oBsCT1DoHg5JEp.dat new file mode 100644 index 00000000..6dd4eca5 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/RqtlE1cJQf6uAxwChVSLFA/meta-lJiFi5oBsCT1DoHg5JEp.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__6XENeSAgTcKslBwgmHwi4g b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__6XENeSAgTcKslBwgmHwi4g new file mode 100644 index 00000000..f9ec4b1d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__6XENeSAgTcKslBwgmHwi4g differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__DhZbUMcqSnWBS44v5cMUGg b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__DhZbUMcqSnWBS44v5cMUGg new file mode 100644 index 00000000..569bbcfb Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__DhZbUMcqSnWBS44v5cMUGg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__F9btx_gBSdKe-x5SV_iL6w b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__F9btx_gBSdKe-x5SV_iL6w new file mode 100644 index 00000000..8621178c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__F9btx_gBSdKe-x5SV_iL6w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__J0xhybbiSRClHsPnRxIc3A b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__J0xhybbiSRClHsPnRxIc3A new file mode 100644 index 00000000..0e8bde5b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/__J0xhybbiSRClHsPnRxIc3A differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/index-6LpBnTztRVW1EKxlHtYniA b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/index-6LpBnTztRVW1EKxlHtYniA new file mode 100644 index 00000000..48c41c6c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/index-6LpBnTztRVW1EKxlHtYniA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..53eb4fe3 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..6e70b285 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/meta-gJjAipoBsCT1DoHgmZHp.dat b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/meta-gJjAipoBsCT1DoHgmZHp.dat new file mode 100644 index 00000000..d0b45cbf Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/meta-gJjAipoBsCT1DoHgmZHp.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/meta-mJiFi5oBsCT1DoHg5JEt.dat b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/meta-mJiFi5oBsCT1DoHg5JEt.dat new file mode 100644 index 00000000..95eb20ac Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/UMTFR_1qRLGwbyPX-jesHg/meta-mJiFi5oBsCT1DoHg5JEt.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/index-MnC0MOFvTNWjYLQyiy2eJw b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/index-MnC0MOFvTNWjYLQyiy2eJw new file mode 100644 index 00000000..70bb37f1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/index-MnC0MOFvTNWjYLQyiy2eJw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..47341930 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..6faac5ca Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/meta-j5jAipoBsCT1DoHgmZH1.dat b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/meta-j5jAipoBsCT1DoHgmZH1.dat new file mode 100644 index 00000000..28cef9f4 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/meta-j5jAipoBsCT1DoHgmZH1.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/meta-ppiFi5oBsCT1DoHg5JE1.dat b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/meta-ppiFi5oBsCT1DoHg5JE1.dat new file mode 100644 index 00000000..46354195 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/VpuJaCLFTaCQVBt1bXrllQ/meta-ppiFi5oBsCT1DoHg5JE1.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/0/index-l5i_MgLFRXqI-GIOoI2bjQ b/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/0/index-l5i_MgLFRXqI-GIOoI2bjQ new file mode 100644 index 00000000..7b9068cc Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/0/index-l5i_MgLFRXqI-GIOoI2bjQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..139a5ab0 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/meta-jJjAipoBsCT1DoHgmZHy.dat b/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/meta-jJjAipoBsCT1DoHgmZHy.dat new file mode 100644 index 00000000..e3b647a4 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/bA1k7vp2SCmsJARJEqC9vg/meta-jJjAipoBsCT1DoHgmZHy.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__BFItMbeiRYS5GwyoKKlg1g b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__BFItMbeiRYS5GwyoKKlg1g new file mode 100644 index 00000000..e6a87acf Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__BFItMbeiRYS5GwyoKKlg1g differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__BSYkvCPlRpKmIILlOMYFXA b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__BSYkvCPlRpKmIILlOMYFXA new file mode 100644 index 00000000..5b6cbf1e Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__BSYkvCPlRpKmIILlOMYFXA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__G4LEiEW4Sjy2KmWEWx4lOA b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__G4LEiEW4Sjy2KmWEWx4lOA new file mode 100644 index 00000000..90e507a5 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__G4LEiEW4Sjy2KmWEWx4lOA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__K-FuDDwXRkmgWoAer9EEcQ b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__K-FuDDwXRkmgWoAer9EEcQ new file mode 100644 index 00000000..91fcefe4 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__K-FuDDwXRkmgWoAer9EEcQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__L59gSRDzREuFt-b053ucEw b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__L59gSRDzREuFt-b053ucEw new file mode 100644 index 00000000..3b7f98fa Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__L59gSRDzREuFt-b053ucEw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__LFBx0BTBQpajD9ibO7WVAw b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__LFBx0BTBQpajD9ibO7WVAw new file mode 100644 index 00000000..9a67d1ff Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__LFBx0BTBQpajD9ibO7WVAw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__Mr3l1vzpTS6rrFKKrTgCWg b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__Mr3l1vzpTS6rrFKKrTgCWg new file mode 100644 index 00000000..60295920 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__Mr3l1vzpTS6rrFKKrTgCWg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__PepWuQGnQGCtiS9AMZDApQ b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__PepWuQGnQGCtiS9AMZDApQ new file mode 100644 index 00000000..79db0266 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__PepWuQGnQGCtiS9AMZDApQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__PgssWn8WSLqUzRaVydgfrQ b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__PgssWn8WSLqUzRaVydgfrQ new file mode 100644 index 00000000..4cca488d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__PgssWn8WSLqUzRaVydgfrQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__QOpV1Tp9TLqnmaLuLx7shA b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__QOpV1Tp9TLqnmaLuLx7shA new file mode 100644 index 00000000..bdd93989 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__QOpV1Tp9TLqnmaLuLx7shA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__VekXHCO6Tom6WjWgfd4fZg b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__VekXHCO6Tom6WjWgfd4fZg new file mode 100644 index 00000000..01c95781 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__VekXHCO6Tom6WjWgfd4fZg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__bOcUn-B4Q4SBclOo72rszQ b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__bOcUn-B4Q4SBclOo72rszQ new file mode 100644 index 00000000..10f87d8d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__bOcUn-B4Q4SBclOo72rszQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__hEBVVt1SRpKcblIiH9qHvw b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__hEBVVt1SRpKcblIiH9qHvw new file mode 100644 index 00000000..5ae8c4cf Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__hEBVVt1SRpKcblIiH9qHvw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__kRu_1b-dR-Sk46nJ0vr1Cw b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__kRu_1b-dR-Sk46nJ0vr1Cw new file mode 100644 index 00000000..624820fa Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__kRu_1b-dR-Sk46nJ0vr1Cw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__xqwbNwqmSmqbuFLuBKYTKA b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__xqwbNwqmSmqbuFLuBKYTKA new file mode 100644 index 00000000..5d6a8592 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/__xqwbNwqmSmqbuFLuBKYTKA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/index-Ruy6YRhnTjiqnXRmHQgVbw b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/index-Ruy6YRhnTjiqnXRmHQgVbw new file mode 100644 index 00000000..dd895fda Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/index-Ruy6YRhnTjiqnXRmHQgVbw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..de1e5081 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..066b3ca1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/meta-gpjAipoBsCT1DoHgmZHq.dat b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/meta-gpjAipoBsCT1DoHgmZHq.dat new file mode 100644 index 00000000..fe124e8b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/meta-gpjAipoBsCT1DoHgmZHq.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/meta-mpiFi5oBsCT1DoHg5JEu.dat b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/meta-mpiFi5oBsCT1DoHg5JEu.dat new file mode 100644 index 00000000..f6592eb9 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/j6mT98vJQ4OEvJAOIdBWLA/meta-mpiFi5oBsCT1DoHg5JEu.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__2c4iEjx4S3-1CFq4bWsA1w b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__2c4iEjx4S3-1CFq4bWsA1w new file mode 100644 index 00000000..0696ea95 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__2c4iEjx4S3-1CFq4bWsA1w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__2vT84abJT7aOGGTy25Xh6w b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__2vT84abJT7aOGGTy25Xh6w new file mode 100644 index 00000000..cd4ad1bf Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__2vT84abJT7aOGGTy25Xh6w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__3kIgkIPCQTaKh_dlzPKcPA b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__3kIgkIPCQTaKh_dlzPKcPA new file mode 100644 index 00000000..f9b98eae Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__3kIgkIPCQTaKh_dlzPKcPA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__4RVh2lKHS6SXlU0Lhtmr1g b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__4RVh2lKHS6SXlU0Lhtmr1g new file mode 100644 index 00000000..4ae71418 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__4RVh2lKHS6SXlU0Lhtmr1g differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__8kWymbxQQrOaU7jLJvRWLg b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__8kWymbxQQrOaU7jLJvRWLg new file mode 100644 index 00000000..f754929e Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__8kWymbxQQrOaU7jLJvRWLg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__GOC1FjwfTmikTAbYxjECHg b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__GOC1FjwfTmikTAbYxjECHg new file mode 100644 index 00000000..ebbb1883 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__GOC1FjwfTmikTAbYxjECHg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__GdYRvIyPQTO3bnV7j5ulNA b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__GdYRvIyPQTO3bnV7j5ulNA new file mode 100644 index 00000000..cf258965 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__GdYRvIyPQTO3bnV7j5ulNA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__L23y6tFcQja4sFl2RawVlw b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__L23y6tFcQja4sFl2RawVlw new file mode 100644 index 00000000..588c9413 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__L23y6tFcQja4sFl2RawVlw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__XV86rzGaQOmPI78ZbnUFfQ b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__XV86rzGaQOmPI78ZbnUFfQ new file mode 100644 index 00000000..631f2f94 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__XV86rzGaQOmPI78ZbnUFfQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__cCcCGXSqSJGnmlVRV5SdSQ b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__cCcCGXSqSJGnmlVRV5SdSQ new file mode 100644 index 00000000..b707eac5 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__cCcCGXSqSJGnmlVRV5SdSQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__dMA5Vu9TRN-sVcySYDh2XA b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__dMA5Vu9TRN-sVcySYDh2XA new file mode 100644 index 00000000..b062926f Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__dMA5Vu9TRN-sVcySYDh2XA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__etQoUeFuTZeB0ViE3Ipaww b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__etQoUeFuTZeB0ViE3Ipaww new file mode 100644 index 00000000..f6dfd093 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__etQoUeFuTZeB0ViE3Ipaww differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__kkiKvCHyQ1aB3QmHQudMMg b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__kkiKvCHyQ1aB3QmHQudMMg new file mode 100644 index 00000000..d75ce914 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__kkiKvCHyQ1aB3QmHQudMMg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__mlYrqfzTTouWEM721FhqQg b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__mlYrqfzTTouWEM721FhqQg new file mode 100644 index 00000000..44457bee Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__mlYrqfzTTouWEM721FhqQg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__oHPruxzmRByrhvwihwNfGQ b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__oHPruxzmRByrhvwihwNfGQ new file mode 100644 index 00000000..b9812e4b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__oHPruxzmRByrhvwihwNfGQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__qkPBL0WYQICuebPT-wGCGA b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__qkPBL0WYQICuebPT-wGCGA new file mode 100644 index 00000000..10c20ce8 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__qkPBL0WYQICuebPT-wGCGA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__rhX2rlJNSsusWqi9Q-bZsA b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__rhX2rlJNSsusWqi9Q-bZsA new file mode 100644 index 00000000..b0be2453 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__rhX2rlJNSsusWqi9Q-bZsA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__t7Zg5q6RQXS1xDpoubE5rw b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__t7Zg5q6RQXS1xDpoubE5rw new file mode 100644 index 00000000..9153af22 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__t7Zg5q6RQXS1xDpoubE5rw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__trSK8pIPRSWnPuJ1G9ICVg b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__trSK8pIPRSWnPuJ1G9ICVg new file mode 100644 index 00000000..704ca670 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__trSK8pIPRSWnPuJ1G9ICVg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__uUs7SenbQtaZtRppNAZOlg b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__uUs7SenbQtaZtRppNAZOlg new file mode 100644 index 00000000..3e49b06b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__uUs7SenbQtaZtRppNAZOlg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__xFW4h-tURgS2yIFB0kghWA b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__xFW4h-tURgS2yIFB0kghWA new file mode 100644 index 00000000..a1cb4336 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/__xFW4h-tURgS2yIFB0kghWA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/index-buepoj5eT12G5B8ZT5TNug b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/index-buepoj5eT12G5B8ZT5TNug new file mode 100644 index 00000000..fb5f735c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/index-buepoj5eT12G5B8ZT5TNug differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..c27474d4 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..57cb41a7 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/meta-kJjAipoBsCT1DoHgmZH2.dat b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/meta-kJjAipoBsCT1DoHgmZH2.dat new file mode 100644 index 00000000..946b8c60 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/meta-kJjAipoBsCT1DoHgmZH2.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/meta-pJiFi5oBsCT1DoHg5JE1.dat b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/meta-pJiFi5oBsCT1DoHg5JE1.dat new file mode 100644 index 00000000..97d76501 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/m_qyTs5yTvCGmY7n4Z5XvA/meta-pJiFi5oBsCT1DoHg5JE1.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__2cgSveVWRoiQZKEyBQPSRA b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__2cgSveVWRoiQZKEyBQPSRA new file mode 100644 index 00000000..72283c86 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__2cgSveVWRoiQZKEyBQPSRA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__EK43sfAPTiCBTucYydbTpQ b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__EK43sfAPTiCBTucYydbTpQ new file mode 100644 index 00000000..68cdb1ae Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__EK43sfAPTiCBTucYydbTpQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__EVdM-kuQR46_a9u1qLDDPQ b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__EVdM-kuQR46_a9u1qLDDPQ new file mode 100644 index 00000000..2c0a7236 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__EVdM-kuQR46_a9u1qLDDPQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Jh8WAPuVTVGXY19vWBOpqQ b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Jh8WAPuVTVGXY19vWBOpqQ new file mode 100644 index 00000000..6175d679 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Jh8WAPuVTVGXY19vWBOpqQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Lee5Gx3eT-6QGorJk0Dbhw b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Lee5Gx3eT-6QGorJk0Dbhw new file mode 100644 index 00000000..a052269e Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Lee5Gx3eT-6QGorJk0Dbhw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__RMFL5lHDQ8mi6L3GovjJdA b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__RMFL5lHDQ8mi6L3GovjJdA new file mode 100644 index 00000000..78028397 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__RMFL5lHDQ8mi6L3GovjJdA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__SjLxWx9TSUONI3fcF3NwIg b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__SjLxWx9TSUONI3fcF3NwIg new file mode 100644 index 00000000..47aadcf4 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__SjLxWx9TSUONI3fcF3NwIg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Zz9pEe9lS1CIWPdwTZ54Zw b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Zz9pEe9lS1CIWPdwTZ54Zw new file mode 100644 index 00000000..85d94776 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__Zz9pEe9lS1CIWPdwTZ54Zw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__aZkc-XzPT0CkpMwoOMyp0A b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__aZkc-XzPT0CkpMwoOMyp0A new file mode 100644 index 00000000..4129b50a Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__aZkc-XzPT0CkpMwoOMyp0A differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__f4fpJBVLTnOQqEOyZWM-Pw b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__f4fpJBVLTnOQqEOyZWM-Pw new file mode 100644 index 00000000..f53cd63c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__f4fpJBVLTnOQqEOyZWM-Pw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__ocyDGIatTWSODAveQx0vFQ b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__ocyDGIatTWSODAveQx0vFQ new file mode 100644 index 00000000..435bfc8f Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__ocyDGIatTWSODAveQx0vFQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__zXWWR6tvTtWRAGTsGzomhA b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__zXWWR6tvTtWRAGTsGzomhA new file mode 100644 index 00000000..11b81a78 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/__zXWWR6tvTtWRAGTsGzomhA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/index-ys1HBUryRQKdg9Gw984oAA b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/index-ys1HBUryRQKdg9Gw984oAA new file mode 100644 index 00000000..b2f5a660 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/index-ys1HBUryRQKdg9Gw984oAA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..ba5a974d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..412826eb Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/meta-hpjAipoBsCT1DoHgmZHu.dat b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/meta-hpjAipoBsCT1DoHgmZHu.dat new file mode 100644 index 00000000..4ed7c33d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/meta-hpjAipoBsCT1DoHgmZHu.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/meta-npiFi5oBsCT1DoHg5JEy.dat b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/meta-npiFi5oBsCT1DoHg5JEy.dat new file mode 100644 index 00000000..cd7b97c3 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/oy2sh9SZS8KtAN5ps0ELAQ/meta-npiFi5oBsCT1DoHg5JEy.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/0/index-V75EsTNYR7eKknNTBF6gjw b/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/0/index-V75EsTNYR7eKknNTBF6gjw new file mode 100644 index 00000000..f5ca2067 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/0/index-V75EsTNYR7eKknNTBF6gjw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..5125d895 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/meta-i5jAipoBsCT1DoHgmZHy.dat b/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/meta-i5jAipoBsCT1DoHgmZHy.dat new file mode 100644 index 00000000..bc6af69b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/pP3fIGXzQui23NLKOphyZQ/meta-i5jAipoBsCT1DoHgmZHy.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/index-TeoEUdMrQrGsTUGjE_PIMw b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/index-TeoEUdMrQrGsTUGjE_PIMw new file mode 100644 index 00000000..eb5cfd61 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/index-TeoEUdMrQrGsTUGjE_PIMw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..1e26e90e Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..988b57f5 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/meta-gZjAipoBsCT1DoHgmZHq.dat b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/meta-gZjAipoBsCT1DoHgmZHq.dat new file mode 100644 index 00000000..09ab3025 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/meta-gZjAipoBsCT1DoHgmZHq.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/meta-mZiFi5oBsCT1DoHg5JEu.dat b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/meta-mZiFi5oBsCT1DoHg5JEu.dat new file mode 100644 index 00000000..9af0cd35 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/pse6TUNcQPyJ_yMad2ClYQ/meta-mZiFi5oBsCT1DoHg5JEu.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/index-cmtTJDZkTJmD8Zo0T7K4IQ b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/index-cmtTJDZkTJmD8Zo0T7K4IQ new file mode 100644 index 00000000..3b888147 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/index-cmtTJDZkTJmD8Zo0T7K4IQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..109423e1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..50f49350 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/meta-k5jAipoBsCT1DoHgmZH2.dat b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/meta-k5jAipoBsCT1DoHgmZH2.dat new file mode 100644 index 00000000..95507739 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/meta-k5jAipoBsCT1DoHgmZH2.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/meta-qJiFi5oBsCT1DoHg5JE5.dat b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/meta-qJiFi5oBsCT1DoHg5JE5.dat new file mode 100644 index 00000000..f224dfa9 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/qPFbyW2mSdGX_P8QqA7HOA/meta-qJiFi5oBsCT1DoHg5JE5.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__29QUCPGJSLC-WvSReEsaPA b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__29QUCPGJSLC-WvSReEsaPA new file mode 100644 index 00000000..f6a58a36 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__29QUCPGJSLC-WvSReEsaPA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__DQTDvFiuSMCv5OaNBJ47kw b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__DQTDvFiuSMCv5OaNBJ47kw new file mode 100644 index 00000000..f1d38a00 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__DQTDvFiuSMCv5OaNBJ47kw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__MKflISiQTpGDiVTriO4BIg b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__MKflISiQTpGDiVTriO4BIg new file mode 100644 index 00000000..e284ac15 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__MKflISiQTpGDiVTriO4BIg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__MspcB-U9RKS7ah0fMAnl5g b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__MspcB-U9RKS7ah0fMAnl5g new file mode 100644 index 00000000..f3f13a5d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__MspcB-U9RKS7ah0fMAnl5g differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__NuyZeS8QSXu5mzb3hJlAxg b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__NuyZeS8QSXu5mzb3hJlAxg new file mode 100644 index 00000000..c1fcb5bb Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__NuyZeS8QSXu5mzb3hJlAxg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__SVCN0g2YTuG-R5BtAruz5A b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__SVCN0g2YTuG-R5BtAruz5A new file mode 100644 index 00000000..15abfca1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__SVCN0g2YTuG-R5BtAruz5A differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/___bg2ATW9SAiWlYkmiHdeEw b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/___bg2ATW9SAiWlYkmiHdeEw new file mode 100644 index 00000000..4c193856 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/___bg2ATW9SAiWlYkmiHdeEw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__aFpYS_HyQlO87bF0EYoDGw b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__aFpYS_HyQlO87bF0EYoDGw new file mode 100644 index 00000000..6982d8c5 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__aFpYS_HyQlO87bF0EYoDGw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__aY6F5r27RK2_NYfVPo7T8Q b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__aY6F5r27RK2_NYfVPo7T8Q new file mode 100644 index 00000000..61cf4656 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__aY6F5r27RK2_NYfVPo7T8Q differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__jjwhwrMUS6qAvEA7RFB-bg b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__jjwhwrMUS6qAvEA7RFB-bg new file mode 100644 index 00000000..8fbe45d7 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__jjwhwrMUS6qAvEA7RFB-bg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__jyKEpcIBQu-BMX_yhlOWeA b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__jyKEpcIBQu-BMX_yhlOWeA new file mode 100644 index 00000000..5058b871 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__jyKEpcIBQu-BMX_yhlOWeA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__m8SmB0AsSYCwlsnMbjfR8A b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__m8SmB0AsSYCwlsnMbjfR8A new file mode 100644 index 00000000..9988bdf9 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/__m8SmB0AsSYCwlsnMbjfR8A differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/index-6OI8oi5KSUertpmzyWZUPA b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/index-6OI8oi5KSUertpmzyWZUPA new file mode 100644 index 00000000..cd904e1f Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/index-6OI8oi5KSUertpmzyWZUPA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..ddf1fca7 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..af5f53fb Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/meta-fpjAipoBsCT1DoHgmZHm.dat b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/meta-fpjAipoBsCT1DoHgmZHm.dat new file mode 100644 index 00000000..19a6f99d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/meta-fpjAipoBsCT1DoHgmZHm.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/meta-l5iFi5oBsCT1DoHg5JEp.dat b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/meta-l5iFi5oBsCT1DoHg5JEp.dat new file mode 100644 index 00000000..941a283d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/uAg9w7tDR6qyVmTLn8RmCA/meta-l5iFi5oBsCT1DoHg5JEp.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/index-q30WmG3ySdW8pUGRFtu4RQ b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/index-q30WmG3ySdW8pUGRFtu4RQ new file mode 100644 index 00000000..c96a8209 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/index-q30WmG3ySdW8pUGRFtu4RQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..5fe96c19 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..836a522b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/meta-h5jAipoBsCT1DoHgmZHu.dat b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/meta-h5jAipoBsCT1DoHgmZHu.dat new file mode 100644 index 00000000..67de3251 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/meta-h5jAipoBsCT1DoHgmZHu.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/meta-oZiFi5oBsCT1DoHg5JEy.dat b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/meta-oZiFi5oBsCT1DoHg5JEy.dat new file mode 100644 index 00000000..02a442e1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/vvVaz64ZTNOPihaPXCcRQw/meta-oZiFi5oBsCT1DoHg5JEy.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/index-EjvjCQOUQ1GqJ1ysn5UDdw b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/index-EjvjCQOUQ1GqJ1ysn5UDdw new file mode 100644 index 00000000..a21d24f1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/index-EjvjCQOUQ1GqJ1ysn5UDdw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..3e42071c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..11d908af Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/meta-kpjAipoBsCT1DoHgmZH2.dat b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/meta-kpjAipoBsCT1DoHgmZH2.dat new file mode 100644 index 00000000..a556c4cf Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/meta-kpjAipoBsCT1DoHgmZH2.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/meta-p5iFi5oBsCT1DoHg5JE4.dat b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/meta-p5iFi5oBsCT1DoHg5JE4.dat new file mode 100644 index 00000000..9891dbe8 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/wUY2GQixQFicwBoOvPOQWQ/meta-p5iFi5oBsCT1DoHg5JE4.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__-IO3F5nPR2aG-lTG1s-8CA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__-IO3F5nPR2aG-lTG1s-8CA new file mode 100644 index 00000000..821abe8e Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__-IO3F5nPR2aG-lTG1s-8CA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__-cvB_n68T9m614mei_3vbA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__-cvB_n68T9m614mei_3vbA new file mode 100644 index 00000000..3a5e105c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__-cvB_n68T9m614mei_3vbA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__0j-F93ISQbaa6yJleclzew b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__0j-F93ISQbaa6yJleclzew new file mode 100644 index 00000000..baba7b81 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__0j-F93ISQbaa6yJleclzew differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__3RZgO5C-TFmRL7IrYeTTUw b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__3RZgO5C-TFmRL7IrYeTTUw new file mode 100644 index 00000000..9d24b98d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__3RZgO5C-TFmRL7IrYeTTUw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__4QrKcu4_Q12DlitZHMuNbw b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__4QrKcu4_Q12DlitZHMuNbw new file mode 100644 index 00000000..1247f00f Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__4QrKcu4_Q12DlitZHMuNbw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__5EZyEfFNR9aoEVWk012rYQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__5EZyEfFNR9aoEVWk012rYQ new file mode 100644 index 00000000..45bd682d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__5EZyEfFNR9aoEVWk012rYQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__6Dxhw6vPRWq6QDeDyOymew b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__6Dxhw6vPRWq6QDeDyOymew new file mode 100644 index 00000000..1740c1b9 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__6Dxhw6vPRWq6QDeDyOymew differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AGEdZ7KvR0iXTUSDUKrZWw b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AGEdZ7KvR0iXTUSDUKrZWw new file mode 100644 index 00000000..16d98d66 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AGEdZ7KvR0iXTUSDUKrZWw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AHbhA62JQdahj7gyz7GXrQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AHbhA62JQdahj7gyz7GXrQ new file mode 100644 index 00000000..dd042e79 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AHbhA62JQdahj7gyz7GXrQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AT_iNisLSKysnC_nYwUVrQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AT_iNisLSKysnC_nYwUVrQ new file mode 100644 index 00000000..b2f60ea0 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__AT_iNisLSKysnC_nYwUVrQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__GCxSUbofQA6DBA6v8r9fWg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__GCxSUbofQA6DBA6v8r9fWg new file mode 100644 index 00000000..f41e0d14 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__GCxSUbofQA6DBA6v8r9fWg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__GwXI0MQWQ9GNYjbCuc-EiA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__GwXI0MQWQ9GNYjbCuc-EiA new file mode 100644 index 00000000..9fb1364d Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__GwXI0MQWQ9GNYjbCuc-EiA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Jgq7VEj_TX21mbG_HlmVbQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Jgq7VEj_TX21mbG_HlmVbQ new file mode 100644 index 00000000..85366d5c Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Jgq7VEj_TX21mbG_HlmVbQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__KE3iFkQzTeWgacuNUFWuFg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__KE3iFkQzTeWgacuNUFWuFg new file mode 100644 index 00000000..f1080baa Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__KE3iFkQzTeWgacuNUFWuFg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__LWp60QgNTBSMYIKp-mIuSA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__LWp60QgNTBSMYIKp-mIuSA new file mode 100644 index 00000000..b433fc31 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__LWp60QgNTBSMYIKp-mIuSA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Rq4_6C8HSxa_JWATbmRUhw b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Rq4_6C8HSxa_JWATbmRUhw new file mode 100644 index 00000000..595ad2e5 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Rq4_6C8HSxa_JWATbmRUhw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__TbEOjDmwRN-_JGMaylWgCg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__TbEOjDmwRN-_JGMaylWgCg new file mode 100644 index 00000000..7cf8c367 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__TbEOjDmwRN-_JGMaylWgCg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__U5hd2MNKRdyrgAgjw4rwAA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__U5hd2MNKRdyrgAgjw4rwAA new file mode 100644 index 00000000..ba3c68be Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__U5hd2MNKRdyrgAgjw4rwAA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__UnxA6BlSTAebNH-TVo5dzQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__UnxA6BlSTAebNH-TVo5dzQ new file mode 100644 index 00000000..60462114 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__UnxA6BlSTAebNH-TVo5dzQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__W8m5IxeoTwqGoUUzB66oxw b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__W8m5IxeoTwqGoUUzB66oxw new file mode 100644 index 00000000..5af7fe40 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__W8m5IxeoTwqGoUUzB66oxw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XBWdMuBvSFO3cWhm_6GAzg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XBWdMuBvSFO3cWhm_6GAzg new file mode 100644 index 00000000..155b264b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XBWdMuBvSFO3cWhm_6GAzg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XEAsTzOcRo2B-UMV7m7gIQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XEAsTzOcRo2B-UMV7m7gIQ new file mode 100644 index 00000000..902a9845 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XEAsTzOcRo2B-UMV7m7gIQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XTM9OT_VSpyeHc82LhN1Eg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XTM9OT_VSpyeHc82LhN1Eg new file mode 100644 index 00000000..4c6bad7b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__XTM9OT_VSpyeHc82LhN1Eg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Y4zSu218T5iP5ApFxxm5EQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Y4zSu218T5iP5ApFxxm5EQ new file mode 100644 index 00000000..401477dc Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__Y4zSu218T5iP5ApFxxm5EQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__YTsE0VkeRoCBz7Vihns5qA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__YTsE0VkeRoCBz7Vihns5qA new file mode 100644 index 00000000..8c509626 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__YTsE0VkeRoCBz7Vihns5qA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__YkUkDQULSti7bsSGdtmfkQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__YkUkDQULSti7bsSGdtmfkQ new file mode 100644 index 00000000..dcc091c2 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__YkUkDQULSti7bsSGdtmfkQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__cY3Akn_IQDimav3jANGeRg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__cY3Akn_IQDimav3jANGeRg new file mode 100644 index 00000000..a9fcd314 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__cY3Akn_IQDimav3jANGeRg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__e6b7ojM6TWem53W453-xfQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__e6b7ojM6TWem53W453-xfQ new file mode 100644 index 00000000..ebefb053 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__e6b7ojM6TWem53W453-xfQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__heM9sBJbTxu_-G3-bVChRQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__heM9sBJbTxu_-G3-bVChRQ new file mode 100644 index 00000000..245bc495 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__heM9sBJbTxu_-G3-bVChRQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__iAZWJPfpSrinbqBYkNgiIA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__iAZWJPfpSrinbqBYkNgiIA new file mode 100644 index 00000000..75d82da1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__iAZWJPfpSrinbqBYkNgiIA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__k1HMOtksQdmD_aUe61dZnQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__k1HMOtksQdmD_aUe61dZnQ new file mode 100644 index 00000000..9d483ee8 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__k1HMOtksQdmD_aUe61dZnQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kHfaZR2PRiGQ9Dc5gvjkEg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kHfaZR2PRiGQ9Dc5gvjkEg new file mode 100644 index 00000000..d3eb09ab Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kHfaZR2PRiGQ9Dc5gvjkEg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kMU8Pu5IRlugFzIE70WoNw b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kMU8Pu5IRlugFzIE70WoNw new file mode 100644 index 00000000..2f284923 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kMU8Pu5IRlugFzIE70WoNw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kif5hpgKT2KylXcequ6HXg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kif5hpgKT2KylXcequ6HXg new file mode 100644 index 00000000..2dfb8cbe Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__kif5hpgKT2KylXcequ6HXg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__lR38Jc_5Qlut2iYGDnBk4w b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__lR38Jc_5Qlut2iYGDnBk4w new file mode 100644 index 00000000..6644bdc6 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__lR38Jc_5Qlut2iYGDnBk4w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__n8_H5pB1TFmaYkt5Z_BoHg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__n8_H5pB1TFmaYkt5Z_BoHg new file mode 100644 index 00000000..1382cde5 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__n8_H5pB1TFmaYkt5Z_BoHg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__qA9wkUuNSAOiQy7Vu8K8Wg b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__qA9wkUuNSAOiQy7Vu8K8Wg new file mode 100644 index 00000000..4ad930b2 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__qA9wkUuNSAOiQy7Vu8K8Wg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__tN95--nqSOmmifmBb7OUbQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__tN95--nqSOmmifmBb7OUbQ new file mode 100644 index 00000000..09f2b0ec Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__tN95--nqSOmmifmBb7OUbQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__tYNeKmwtTN2Zy0hCoQA_QA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__tYNeKmwtTN2Zy0hCoQA_QA new file mode 100644 index 00000000..a001b62b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__tYNeKmwtTN2Zy0hCoQA_QA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__uZaONP4MRzWTadVMSKc9uQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__uZaONP4MRzWTadVMSKc9uQ new file mode 100644 index 00000000..82cd378f Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__uZaONP4MRzWTadVMSKc9uQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__v0ul-IZSSVuFtOUVeDrKxQ b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__v0ul-IZSSVuFtOUVeDrKxQ new file mode 100644 index 00000000..a6a877b6 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__v0ul-IZSSVuFtOUVeDrKxQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__v_kxNMzMQ6GNvIgT-ygMog b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__v_kxNMzMQ6GNvIgT-ygMog new file mode 100644 index 00000000..f6c1a289 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__v_kxNMzMQ6GNvIgT-ygMog differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__zk2w7X7vTAijF0GJE-aJNA b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__zk2w7X7vTAijF0GJE-aJNA new file mode 100644 index 00000000..3aa8e457 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/__zk2w7X7vTAijF0GJE-aJNA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/index-_q5vp5HyTtKX6wyFdwZM6w b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/index-_q5vp5HyTtKX6wyFdwZM6w new file mode 100644 index 00000000..e2614a01 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/index-_q5vp5HyTtKX6wyFdwZM6w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..743404d0 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..2c7ba910 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/meta-g5jAipoBsCT1DoHgmZHq.dat b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/meta-g5jAipoBsCT1DoHgmZHq.dat new file mode 100644 index 00000000..a84cc09b Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/meta-g5jAipoBsCT1DoHgmZHq.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/meta-nJiFi5oBsCT1DoHg5JEu.dat b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/meta-nJiFi5oBsCT1DoHg5JEu.dat new file mode 100644 index 00000000..385e07ef Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yAn27kDrQma3mjVS9VTUkw/meta-nJiFi5oBsCT1DoHg5JEu.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__7AA1YsisR-irTwsceGMorQ b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__7AA1YsisR-irTwsceGMorQ new file mode 100644 index 00000000..c00c3ad0 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__7AA1YsisR-irTwsceGMorQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__Ej-3Fxv1SKKvw8js1BqhNQ b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__Ej-3Fxv1SKKvw8js1BqhNQ new file mode 100644 index 00000000..9f16c429 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__Ej-3Fxv1SKKvw8js1BqhNQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__JLVI1WsgSHCYQybA4c4myg b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__JLVI1WsgSHCYQybA4c4myg new file mode 100644 index 00000000..bfe230c8 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__JLVI1WsgSHCYQybA4c4myg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__LTJuW_DBSuy_HxHi0I_sUg b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__LTJuW_DBSuy_HxHi0I_sUg new file mode 100644 index 00000000..e6fcadd5 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__LTJuW_DBSuy_HxHi0I_sUg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__MZ8fXObrSI-Lkpf4JZPwjA b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__MZ8fXObrSI-Lkpf4JZPwjA new file mode 100644 index 00000000..256380ef Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__MZ8fXObrSI-Lkpf4JZPwjA differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__OxW-bL9nSGCBWon6kUJ5_Q b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__OxW-bL9nSGCBWon6kUJ5_Q new file mode 100644 index 00000000..740a769f Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__OxW-bL9nSGCBWon6kUJ5_Q differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__Q4gHzSvbR5ywv_2UZPsqiw b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__Q4gHzSvbR5ywv_2UZPsqiw new file mode 100644 index 00000000..d4fd45d3 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__Q4gHzSvbR5ywv_2UZPsqiw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__TaW7BIg9QbyO59Q9ifFffw b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__TaW7BIg9QbyO59Q9ifFffw new file mode 100644 index 00000000..dcb772c6 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__TaW7BIg9QbyO59Q9ifFffw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__YoJK5v_HSY2rPuCDKgZvAQ b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__YoJK5v_HSY2rPuCDKgZvAQ new file mode 100644 index 00000000..0197e73a Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__YoJK5v_HSY2rPuCDKgZvAQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__bE36SHAfQIuQRq0RBv2QlQ b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__bE36SHAfQIuQRq0RBv2QlQ new file mode 100644 index 00000000..7b134aba Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__bE36SHAfQIuQRq0RBv2QlQ differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__iA2ESXO_S1m0QP8sizCzNg b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__iA2ESXO_S1m0QP8sizCzNg new file mode 100644 index 00000000..87c0b240 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__iA2ESXO_S1m0QP8sizCzNg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__l53WWAVXRECvEKoYzLgncw b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__l53WWAVXRECvEKoYzLgncw new file mode 100644 index 00000000..bdfa9bdd Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__l53WWAVXRECvEKoYzLgncw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__nfMSeavGRsyEVyPmd2N-Hg b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__nfMSeavGRsyEVyPmd2N-Hg new file mode 100644 index 00000000..39af8e70 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__nfMSeavGRsyEVyPmd2N-Hg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__q4rerl8KQESmrD54Ub2rcw b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__q4rerl8KQESmrD54Ub2rcw new file mode 100644 index 00000000..da11150a Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__q4rerl8KQESmrD54Ub2rcw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__u1-dFyezSXi2PiSTrw95Tg b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__u1-dFyezSXi2PiSTrw95Tg new file mode 100644 index 00000000..7cf87d3f Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__u1-dFyezSXi2PiSTrw95Tg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__vhOT7ixsSUqEG5OTqJJ1Xg b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__vhOT7ixsSUqEG5OTqJJ1Xg new file mode 100644 index 00000000..e8675983 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__vhOT7ixsSUqEG5OTqJJ1Xg differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__whBTiS7eRLq-04vf3D-LRw b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__whBTiS7eRLq-04vf3D-LRw new file mode 100644 index 00000000..be91e058 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__whBTiS7eRLq-04vf3D-LRw differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__x7431pSvQyyz9yWq5N1K6w b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__x7431pSvQyyz9yWq5N1K6w new file mode 100644 index 00000000..edbd8195 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/__x7431pSvQyyz9yWq5N1K6w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/index-FblUkyb7Q9maqddUKHps0w b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/index-FblUkyb7Q9maqddUKHps0w new file mode 100644 index 00000000..6ea91589 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/index-FblUkyb7Q9maqddUKHps0w differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..02bc7fc2 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..abd60a06 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/0/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/meta-f5jAipoBsCT1DoHgmZHm.dat b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/meta-f5jAipoBsCT1DoHgmZHm.dat new file mode 100644 index 00000000..54eb1487 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/meta-f5jAipoBsCT1DoHgmZHm.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/meta-lpiFi5oBsCT1DoHg5JEp.dat b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/meta-lpiFi5oBsCT1DoHg5JEp.dat new file mode 100644 index 00000000..11df78ef Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/indices/yI3EBpqCScqQ2Sxg8Hvi7Q/meta-lpiFi5oBsCT1DoHg5JEp.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/meta-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/meta-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..f5cc0de3 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/meta-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/meta-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/meta-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..01bb0cf1 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/meta-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/snap-33WZyZ1UQLypqhBOjQwgmQ.dat b/tests/assets/easysearch_snapshot_repository/snap-33WZyZ1UQLypqhBOjQwgmQ.dat new file mode 100644 index 00000000..550b92fa Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/snap-33WZyZ1UQLypqhBOjQwgmQ.dat differ diff --git a/tests/assets/easysearch_snapshot_repository/snap-zWoW3T70Td2_a-TJ7kpJEA.dat b/tests/assets/easysearch_snapshot_repository/snap-zWoW3T70Td2_a-TJ7kpJEA.dat new file mode 100644 index 00000000..2ee89db7 Binary files /dev/null and b/tests/assets/easysearch_snapshot_repository/snap-zWoW3T70Td2_a-TJ7kpJEA.dat differ diff --git a/tests/assets/reset_coco_indices.sh b/tests/assets/reset_coco_indices.sh new file mode 100644 index 00000000..23c344ab --- /dev/null +++ b/tests/assets/reset_coco_indices.sh @@ -0,0 +1,4 @@ +curl -X DELETE 'http://127.0.0.1:9200/coco_*' +echo # to add a newline char +curl -X POST 'http://127.0.0.1:9200/_snapshot/repo_ezs/coco_indices/_restore?wait_for_completion=true' +echo # to add a newline char \ No newline at end of file diff --git a/tests/assets/run_integration_tests.py b/tests/assets/run_integration_tests.py new file mode 100755 index 00000000..e97de619 --- /dev/null +++ b/tests/assets/run_integration_tests.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 + +import os + +# All logs start with this identifier +# +# Example: "COCO_TEST_INFO: all tests passed" +LOG_IDENTIFIER = 'COCO_TEST_INFO' + +# Run command with `os.system()` then check its exit code. +def sh(command: str): + status = os.system(command) + if status != 0: + print(f"Command [{command}] failed with exit code [{status}], aborting\n", flush=True) + # print Easysearch logs to make debug easier + if os.getenv("GITHUB_ACTIONS") == "true": + print(f"{LOG_IDENTIFIER}: Easysearch logs:\n", flush=True) + os.system('cat ~/es_install_dir/easysearch.log') + exit(1) + +# Check if we are in the Coco project root by inspecting if the files specified in +# `files_to_check` exist. +def check_pwd() -> bool: + files_to_check: list[str] = [ + "README.md", + "LICENSE", + "main.go", + "coco.yml", + "tests", + "tests/assets", + "tests/loadgen.yml" + ] + + for file in files_to_check: + if not os.path.exists(file): + return False + + return True + +# Run the tests in the specified DSL file +def run_dsl(dsl_file: str): + # Cleanup + sh('bash ./tests/assets/stop_coco.sh') + sh('bash ./tests/assets/reset_coco_indices.sh') + + sh('bash ./tests/assets/start_coco.sh') + sh(f'loadgen -config ./tests/loadgen.yml -run {dsl_file} -debug') + + # Cleanup + sh('bash ./tests/assets/stop_coco.sh') + sh('bash ./tests/assets/reset_coco_indices.sh') + + +# Main entry +def run_integration_tests(): + # We should run tests from the root directory, check this + in_coco_project_root = check_pwd() + if not in_coco_project_root: + print(f"{LOG_IDENTIFIER}: {__file__} should be invoked from the project root\n", flush=True) + exit(1) + + # Discover DSL scenarios under tests/ and execute sequentially + dsl_files = [] + for root, _, files in os.walk('tests'): + for file_name in files: + if file_name.endswith('.dsl'): + dsl_files.append(os.path.join(root, file_name)) + + if not dsl_files: + print(f'{LOG_IDENTIFIER}: No DSL files found under tests/.\n', flush=True) + return + + print(f"COCO_TEST_INFO: {len(dsl_files)} tests to run\n", flush=True) + for dsl_file_index, dsl_file in enumerate(sorted(dsl_files), start=1): + print(f"{LOG_IDENTIFIER}: Run tests in [{dsl_file_index}:{dsl_file}]\n", flush=True) + run_dsl(dsl_file) + print(f"{LOG_IDENTIFIER}: all [{len(dsl_files)}] tests passed!\n", flush=True) + + +if __name__ == "__main__": + run_integration_tests() \ No newline at end of file diff --git a/tests/assets/start_coco.sh b/tests/assets/start_coco.sh new file mode 100644 index 00000000..53aeb915 --- /dev/null +++ b/tests/assets/start_coco.sh @@ -0,0 +1,11 @@ +nohup ./bin/coco & +echo $! > integration_test_coco.pid + +while ! nc -z 127.0.0.1 9000; do + echo "Coco Server is not up. Will re-check in 5 seconds..." + sleep 5 +done +while ! nc -z 127.0.0.1 2900; do + echo "Coco Server is not up. Will re-check in 5 seconds..." + sleep 5 +done \ No newline at end of file diff --git a/tests/assets/stop_coco.sh b/tests/assets/stop_coco.sh new file mode 100644 index 00000000..bc90f45a --- /dev/null +++ b/tests/assets/stop_coco.sh @@ -0,0 +1,10 @@ +kill -SIGTERM $(cat integration_test_coco.pid) + +while nc -z 127.0.0.1 9000; do + echo "Coco Server is still running. Waiting for it to exit..." + sleep 5 +done +while nc -z 127.0.0.1 2900; do + echo "Coco Server is still running. Waiting for it to exit..." + sleep 5 +done \ No newline at end of file diff --git a/tests/assistant/scenario1.dsl b/tests/assistant/scenario1.dsl new file mode 100644 index 00000000..a8b89069 --- /dev/null +++ b/tests/assistant/scenario1.dsl @@ -0,0 +1,362 @@ +#// Scenario 1: +#// +#// Owner (admin) grants other users permission, then other users will have +#// the corresponding permission. + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Test +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [view] permission to assistant [aichat_a] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [admin] grants user [b] [edit] permission to assistant [aichat_b] +POST /resources/assistant/$[[env.AICHAT_B_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_B_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_B_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 8 +#// +#// User [admin] grants user [c] [share] permission to assistant [aichat_c] +POST /resources/assistant/$[[env.AICHAT_C_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_C_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_C_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + +#// 9 +#// +#// User [admin] grants user [d] [view] permission to assistant [aichat_d] +POST /resources/assistant/$[[env.AICHAT_D_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_D_ID]]", + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_D_ID]]", +# "principal_id": "$[[env.D_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + +#// 10 +#// +#// User [a] can see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "$[[env.AICHAT_A_NAME]]" } +# ] +# }) + + +#// 11 +#// +#// User [b] can see assistant [aichat_b] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "$[[env.AICHAT_B_NAME]]" } +# ] +# }) + + +#// 12 +#// +#// User [c] can see assistant [aichat_c] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "$[[env.AICHAT_C_NAME]]" } +# ] +# }) + + +#// 13 +#// +#// User [d] can see assistant [aichat_d] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "$[[env.AICHAT_D_NAME]]" } +# ] +# }) + +#// 14 +#// +#// User [a] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 15 +#// +#// User [b] can create a new conversation with [aichat_b] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_B_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 16 +#// +#// User [c] can create a new conversation with [aichat_c] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_C_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 17 +#// +#// User [d] can create a new conversation with [aichat_d] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_D_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } \ No newline at end of file diff --git a/tests/assistant/scenario2.dsl b/tests/assistant/scenario2.dsl new file mode 100644 index 00000000..fed3b70c --- /dev/null +++ b/tests/assistant/scenario2.dsl @@ -0,0 +1,603 @@ +#// Scenario 2: +#// +#// Users with [share] permission can grant other users permission. + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] grants user [a] [share] permission to assistant [aichat_a] +#// 2. User [a] has that [share] permission to it and can create conversation +#// with it +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [share] permission to assistant [aichat_a] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// Verify that user [a] has [share] permission to [aichat_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.AICHAT_A_ID]]", + "resource_type": "assistant" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [{ +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# }], +# ) + + +#// 8 +#// +#// User [a] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] grants user [b] [edit] permission to assistant [aichat_a] +#// 2. User [a] grants user [c] [share] permission to assistant [aichat_a] +#// 3. Verify that user [b,c] have the corresponding permission +#// 4. Verify that [aichat_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 9 +#// +#// User [a] grants user [b] [edit] permission to assistant [aichat_a] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_assistant_a_user_b: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 10 +#// +#// User [a] grants user [c] [share] permission to assistant [aichat_a] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_assistant_a_user_c: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 11 +#// +#// Verify that user [b, c] have the corresponding permission to [aichat_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.AICHAT_A_ID]]", + "resource_type": "assistant" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# }, +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# ) + + +#// 12 +#// +#// User [b] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 13 +#// +#// User [c] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 14 +#// +#// User [d] cannot see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [c] grants user [a] [edit] permission to assistant [aichat_a] +#// 3. Verify the permissions granted on [aichat_a]: +#// a: edit +#// b: edit +#// c: share +#// 4. Verify that [aichat_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 15 +#// +#// User [c] grants user [a] [edit] permission to assistant [aichat_a] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_c_assistant_a_user_a: "_ctx.response.body_json.updated.0.id" }, +# ], +# +# sleep: { +# "sleep_in_milli_seconds": 1000 +# }, +# +# assert: (200, { +# "updated": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 16 +#// +#// Verify the permissions granted on [aichat_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.AICHAT_A_ID]]", + "resource_type": "assistant" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# }, +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# ) + + +#// 17 +#// +#// User [a] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 18 +#// +#// User [b] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 19 +#// +#// User [d] cannot see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 4: +#// 1. User [admin] revokes the permissions to [aichat_a] from user [a, b, c] +#// 2. Verify that users [a, b, c, d] cannot see the [aichat_a] +#// +#//---------------------------------------------------------------------------- + +#// 20 +#// +#// User [admin] revokes the permissions to [aichat_a] from user [a, b, c] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_assistant_a_user_b]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + }, + { + "id": "$[[grant_user_a_assistant_a_user_c]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + }, + { + "id": "$[[grant_user_c_assistant_a_user_a]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# }, +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# ] +# }) + + +#// 21 +#// +#// User [a] cannot see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 22 +#// +#// User [b] cannot see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 23 +#// +#// User [c] cannot see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 24 +#// +#// User [d] cannot see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) \ No newline at end of file diff --git a/tests/assistant/scenario3.dsl b/tests/assistant/scenario3.dsl new file mode 100644 index 00000000..d291a611 --- /dev/null +++ b/tests/assistant/scenario3.dsl @@ -0,0 +1,539 @@ +#// Scenario 3: +#// +#// Users with [edit] permission can modify assistant settings. + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] grants user [a] [edit] permission to assistant [aichat_a] +#// 2. User [admin] grants user [b] [view] permission to assistant [aichat_a] +#// 3. User [admin] grants user [c] [share] permission to assistant [aichat_a] +#// 4. Users [a, b, c] have the corresponding permission +#// 5. [aichat_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [edit] permission to assistant [aichat_a] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + + +#// 7 +#// +#// User [admin] grants user [b] [view] permission to assistant [aichat_a] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 8 +#// +#// User [admin] grants user [c] [share] permission to assistant [aichat_a] +POST /resources/assistant/$[[env.AICHAT_A_ID]]/share +{ + "shares": [ + { + "resource_type": "assistant", + "resource_id": "$[[env.AICHAT_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + + +#// 9 +#// +#// Verify that users [a, b, c] have the corresponding permission +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.AICHAT_A_ID]]", + "resource_type": "assistant" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.AICHAT_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ], +# ) + + +#// 10 +#// +#// User [a] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 11 +#// +#// User [b] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 12 +#// +#// User [c] can create a new conversation with [aichat_a] +POST /chat/_create?search=false&deep_thinking=false&mcp=false&datasource=hacker_news&assistant_id=$[[env.AICHAT_A_ID]] +{"message":"hello"} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 13 +#// +#// User [d] cannot see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] renames [aichat_a] [aichat_1] +#// 2. User [b, c] can see assistant [aichat_1] +#// 3. User [d] cannot see assistant [aichat_1] +#// +#//---------------------------------------------------------------------------- + +#// 14 +#// +#// User [a] renames [aichat_a] [aichat_1] +PUT /assistant/$[[env.AICHAT_A_ID]] +{ + "id": "$[[env.AICHAT_A_ID]]", + "name": "aichat_1", + "description": "", + "icon": "font_coco", + "category": "", + "type": "simple", + "answering_model": { + "provider_id": "deepseek", + "name": "deepseek-chat", + "settings": { + "reasoning": false, + "temperature": 0.7, + "top_p": 0.9, + "presence_penalty": 0, + "frequency_penalty": 0, + "max_tokens": 4000, + "max_length": 0 + }, + "prompt": { + "template": "You are a helpful AI assistant.\n You will be given a conversation below and a follow-up question.\n\n {{.context}}\n\n The user has provided the following query:\n {{.query}}\n\n Ensure your response is thoughtful, accurate, and well-structured.\n For complex answers, format your response using clear and well-organized **Markdown** to improve readability.", + "input_vars": null + }, + "id": "deepseek_deepseek-chat" + }, + "role_prompt": "You are a personal AI assistant designed by Coco AI(https://coco.rs), the backend team is behind INFINI Labs(https://infinilabs.com).", + "chat_settings": { + "greeting_message": "Hi! I’m Coco, nice to meet you. I can help answer your questions by tapping into the internet and your data sources. How can I assist you today?", + "suggested": { + "enabled": false, + "questions": [] + }, + "placeholder": "", + "history_message": { + "number": 5, + "compression_threshold": 1000, + "summary": true + } + }, + "enabled": true, + "datasource": { + "enabled": true, + "ids": [ + "*" + ], + "visible": true, + "enabled_by_default": false, + "filter": null + }, + "mcp_servers": { + "enabled": true, + "ids": [ + "*" + ], + "visible": true, + "model": null, + "max_iterations": 5, + "enabled_by_default": false + }, + "upload": { + "enabled": false, + "allowed_file_extensions": [ + "*" + ], + "max_file_size_in_bytes": 1048576, + "max_file_count": 6 + }, + "tools": { + "enabled": false, + "builtin": { + "calculator": false, + "wikipedia": false, + "duckduckgo": false, + "scraper": false + } + }, + "keepalive": "30m" +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.AICHAT_A_ID]]","result":"updated"} ) + + +#// 15 +#// +#// User [b] can see assistant [aichat_1] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "aichat_1" } +# ] +# }) + + +#// 16 +#// +#// User [c] can see assistant [aichat_1] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "aichat_1" } +# ] +# }) + +#// 17 +#// +#// User [d] cannot see assistant [aichat_a] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [admin] deletes [aichat_1] +#// 2. [aichat_1] is invisible to users [b, c, d] +#// +#//---------------------------------------------------------------------------- + +#// 18 +#// +#// User [admin] deletes [aichat_1] +DELETE /assistant/$[[env.AICHAT_A_ID]] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.AICHAT_A_ID]]","result":"deleted"}) + + +#// 17 +#// +#// User [a] cannot see assistant [aichat_1] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 18 +#// +#// User [b] cannot see assistant [aichat_1] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 19 +#// +#// User [c] cannot see assistant [aichat_1] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 20 +#// +#// User [d] cannot see assistant [aichat_1] +GET /assistant/_search?&from=0&size=100&query=&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) \ No newline at end of file diff --git a/tests/datasource/scenario1.dsl b/tests/datasource/scenario1.dsl new file mode 100644 index 00000000..e8345063 --- /dev/null +++ b/tests/datasource/scenario1.dsl @@ -0,0 +1,705 @@ +#// Scenario 1: +#// +#// Owner (admin) grants other users permission, then other users will have the +#// corresponding permission. + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Admin grants user [a] [Share] access to [datasource_1:file_a] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + +#// 3 +#// +#// Admin grants user [b] [Share] access of [datasource_1:file_b] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + + +#// 4 +#// +#// Admin grants user [c] [Share] access of [datasource_1:file_c] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_C_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_C_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_C_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + + +#// 5 +#// +#// Admin grants user [d] [Share] access of [datasource_1:file_d] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_D_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_D_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_D_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_D_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.D_ID]]" +# } +# ] +# }) + + + +#// 6 +#// +#// Admin grants user [a] [Share] access to [datasource_2:file_a] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 7 +#// +#// Admin grants [Share] access to [datasource_2:file_b] to b +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_B_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_B_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_B_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + + +#// 8 +#// +#// Admin grants user [c] [Share] access to [datasource_2:file_c] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + + +#// 9 +#// +#// Admin grants user [d] [Share] access to [datasource_2:file_d] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_D_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_D_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_D_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_D_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.D_ID]]" +# } +# ] +# }) + +#// 10 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + +#// 11 +#// +#// User a can share [datasource_1:file_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 12 +#// +#// User a can share [datasource_2:file_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 13 +#// +#// Search using account a +POST /query/_search?query=file_a&size=100 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 2, +# "hits.hits": [ +# {"_source.title": "file_a"}, +# {"_source.title": "file_a"} +# ] +# }) + + +#// 14 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 15 +#// +#// User b can share [datasource_1:file_b] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ]) + + +#// 16 +#// +#// User b can share [datasource_2:file_b] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_B_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ]) + + +#// 17 +#// +#// Search using account b +POST /query/_search?query=file_a&size=100 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 2, +# "hits.hits": [ +# {"_source.title": "file_b"}, +# {"_source.title": "file_b"} +# ] +# }) + + +#// 18 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 19 +#// +#// User c can share [datasource_1:file_c] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_C_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 20 +#// +#// User c can share [datasource_2:file_c] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 21 +#// +#// Search using account c +POST /query/_search?query=file_a&size=100 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 2, +# "hits.hits": [ +# {"_source.title": "file_c"}, +# {"_source.title": "file_c"} +# ] +# }) + + +#// 22 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 23 +#// +#// User d can share [datasource_1:file_d] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_D_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.D_ID]]" +# } +# ]) + + +#// 24 +#// +#// User d can share [datasource_2:file_d] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_D_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.D_ID]]" +# } +# ]) + + +#// 25 +#// +#// Search using account d +POST /query/_search?query=file_a&size=100 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 2, +# "hits.hits": [ +# {"_source.title": "file_d"}, +# {"_source.title": "file_d"} +# ] +# }) \ No newline at end of file diff --git a/tests/datasource/scenario2.dsl b/tests/datasource/scenario2.dsl new file mode 100644 index 00000000..e55b91cf --- /dev/null +++ b/tests/datasource/scenario2.dsl @@ -0,0 +1,789 @@ +#// Scenario 2: +#// +#// Users that are granted share permission can share datasource/document + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. admin grants: +#// 1. user [a] [share] permission to [datasource_2:file_a] +#// 2. user [b] [share] permission to [datasource_1:file_b] +#// 3. user [c] [share] permission to [datasource_2:file_c] +#// 2. Users [a, b, c] have the corresponding permission +#// 3. Users [d] don't have access to [datasource_1, datasource_2] +#// +#//---------------------------------------------------------------------------- + +#// 6 +#// +#// Admin grants user [a] [Share] permission to [datasource_2:file_a] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 7 +#// +#// Admin grants user [b] [Share] access of [datasource_1:file_b] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 8 +#// +#// [Admin] grants user [c] [Share] access of [datasource_2:file_c] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 9 +#// +#// User a can share [datasource_2:file_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 10 +#// +#// User b can share [datasource_1:file_b] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ]) + + +#// 11 +#// +#// User c can share [datasource_2:file_c] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 12 +#// +#// User [d] cannot see [datasource_1, datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"hits.total.value": 0} ) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] grants: +#// 1. user [b] [view] permission to [datasource_2:file_a] +#// 2. user [c] [edit] permission to [datasource_2:file_a] +#// 2. Users [b, c] have the corresponding permission +#// 3. Users [d] don't have access to [datasource_2:file_a] +#// +#//---------------------------------------------------------------------------- + +#// 13 +#// +#// User a can grant [view] permission to [datasource_2:file_a] to b +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 14 +#// +#// User [a] can grant user [c] [edit] permission to [datasource_2:file_a] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 15 +#// +#// Permission set for [datasource_2:file_a]: +#// 1. user a: share +#// 2. user b: view +#// 3. user b: edit +#// +#// This request uses user [a]'s token +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# }, +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# }, +# { +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 16 +#// +#// User [d] cannot see [datasource_1, datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"hits.total.value": 0} ) + + +#// 17 +#// +#// User [d] cannot see any document from [datasource_2] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_2_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { "hits.total.value": 0 }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [b] grants: +#// 1. user [a] [view] permission to [datasource_1:file_b] +#// 2. user [c] [edit] permission to [datasource_1:file_b] +#// 2. Users [a, c] have the corresponding permission +#// 3. Users [d] don't have access to [datasource_1:file_b] +#// +#//---------------------------------------------------------------------------- + + +#// 18 +#// +#// User [b] can grant user [a] [view] permission to [datasource_1:file_b] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 19 +#// +#// User [b] can grant user [c] [edit] permission to [datasource_1:file_b] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 20 +#// +#// Permission set for [datasource_1:file_b]: +#// 1. user b: share +#// 2. user a: view +#// 3. user c: edit +#// +#// This request uses user [b]'s token +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# }, +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# }, +# { +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 21 +#// +#// User [d] cannot see [datasource_1, datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"hits.total.value": 0} ) + + +#// 22 +#// +#// User [d] cannot see any document from [datasource_1] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_1_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { "hits.total.value": 0 }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 4: +#// 1. User [c] grants: +#// 1. user [a] [view] permission to [datasource_2:file_c] +#// 2. user [b] [edit] permission to [datasource_2:file_c] +#// 2. Users [a, b] have the corresponding permission +#// 3. Users [d] don't have access to [datasource_2:file_c] +#// +#//---------------------------------------------------------------------------- + + +#// 23 +#// +#// User [c] can grant user [a] [view] permission to [datasource_2:file_c] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 24 +#// +#// User [c] can grant user [b] [edit] permission to [datasource_2:file_c] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 25 +#// +#// Permission set for [datasource_2:file_c]: +#// 1. user c: share +#// 2. user a: view +#// 3. user b: edit +#// +#// This request uses user [c]'s token +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# }, +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# }, +# { +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ]) + +#// 26 +#// +#// User [d] cannot see [datasource_1, datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"hits.total.value": 0} ) + +#// 27 +#// +#// User [d] cannot see any document from [datasource_2] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_2_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { "hits.total.value": 0 }) \ No newline at end of file diff --git a/tests/datasource/scenario3.dsl b/tests/datasource/scenario3.dsl new file mode 100644 index 00000000..12c604b7 --- /dev/null +++ b/tests/datasource/scenario3.dsl @@ -0,0 +1,947 @@ +#// Scenario 3: +#// +#// Users that are granted share permission can share datasource/document, then +#// revoke their grants. + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. admin grants: +#// 1. user [a] [share] permission to [datasource_2:file_a] +#// 2. user [b] [share] permission to [datasource_1:file_b] +#// 3. user [c] [share] permission to [datasource_2:file_c] +#// 2. Users [a, b, c] have the corresponding permission +#// 3. Users [d] don't have access to [datasource_1, datasource_2] +#// +#//---------------------------------------------------------------------------- + +#// 6 +#// +#// Admin grants user [a] [Share] permission to [datasource_2:file_a] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 7 +#// +#// Admin grants user [b] [Share] access to [datasource_1:file_b] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 8 +#// +#// [Admin] grants user [c] [Share] access to [datasource_2:file_c] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 9 +#// +#// User a can share [datasource_2:file_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 10 +#// +#// User b can share [datasource_1:file_b] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ]) + + +#// 11 +#// +#// User c can share [datasource_2:file_c] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 12 +#// +#// User [d] cannot see [datasource_1, datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"hits.total.value": 0} ) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] grants: +#// 1. user [b] [view] permission to [datasource_2:file_a] +#// 2. user [c] [edit] permission to [datasource_2:file_a] +#// 2. User [a] revokes the permission perviously granted +#// 3. User [b] cannot see [datasource_2], it can only see [datasource_1] +#// 4. User [c] don't have access to [datasource_2:file_a], it can only see [datasource_2:file_c] +#// 5. User [d] don't have access to [datasource_1, datasource_2] +#// +#//---------------------------------------------------------------------------- + +#// 13 +#// +#// User a grant user [b] [view] permission to [datasource_2:file_a] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_doc_2a_user_b: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 14 +#// +#// User [a] grants user [c] [edit] permission to [datasource_2:file_a] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_doc_2a_user_c: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 15 +#// +#// User [a] revokes the [share] permission granted to user [b] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_doc_2a_user_b]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 16 +#// +#// User [a] revokes the [edit] permission granted to user [c] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_doc_2a_user_c]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 17 +#// +#// User [b] cannot see [datasource_2], it can only see [datasource_1] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ { "_source.name": "$[[env.DATASOURCE_1_NAME]]" } ] +# }) +# + + +#// 18 +#// +#// User [c] don't have access to [datasource_2:file_a], it can only see [datasource_2:file_c] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_2_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ { "_source.title": "file_c" } ] +# }) + + +#// 19 +#// +#// User [d] cannot see [datasource_1, datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"hits.total.value": 0} ) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [b] grants: +#// 1. user [a] [view] permission to [datasource_1:file_b] +#// 2. user [c] [edit] permission to [datasource_1:file_b] +#// 2. User [b] revokes the permission perviously granted +#// 3. User [a] cannot see [datasource_1], it can only see [datasource_2] +#// 4. User [c] cannot see [datasource_1], it can only see [datasource_2] +#// 5. User [d] don't have access to [datasource_1, datasource_2] +#// +#//---------------------------------------------------------------------------- + +#// 20 +#// +#// User [b] grants user [a] [view] permission to [datasource_1:file_b] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_b_doc_1b_user_a: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 21 +#// +#// User [b] grants user [c] [edit] permission to [datasource_1:file_b] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_b_doc_1b_user_c: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 22 +#// +#// User [b] revokes the [view] permission granted to user [a] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_b_doc_1b_user_a]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 23 +#// +#// User [b] revokes the [edit] permission granted to user [c] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_b_doc_1b_user_c]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 24 +#// +#// User [a] cannot see [datasource_1], it can only see [datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ { "_source.name": "$[[env.DATASOURCE_2_NAME]]" } ] +# }) + + +#// 25 +#// +#// User [c] cannot see [datasource_1], it can only see [datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ { "_source.name": "$[[env.DATASOURCE_2_NAME]]" } ] +# }) + + +#// 26 +#// +#// User [d] cannot see [datasource_1, datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"hits.total.value": 0} ) + + +#//---------------------------------------------------------------------------- +#// +#// Case 4: +#// 1. User [c] grants: +#// 1. user [a] [view] permission to [datasource_2:file_c] +#// 2. user [b] [edit] permission to [datasource_2:file_c] +#// 2. User [c] revokes the permission perviously granted +#// 3. User [a] can only see [datasource_2:file_a], it can only see [datasource_2:file_c] +#// 4. User [b] cannot see [datasource_2], it can only see [datasource_1] +#// 5. User [d] don't have access to [datasource_1, datasource_2] +#// +#//---------------------------------------------------------------------------- + +#// 27 +#// +#// User [c] grants user [a] [view] permission to [datasource_2:file_c] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_c_doc_2c_user_a: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 28 +#// +#// User [c] grants user [b] [edit] permission to [datasource_2:file_c] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_2_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_2_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_c_doc_2c_user_b: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 29 +#// +#// User [c] revokes the [view] permission granted to user [a] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_c_doc_2c_user_a]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 30 +#// +#// User [c] revokes the [edit] permission granted to user [b] +POST /resources/document/$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_c_doc_2c_user_b]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_DOCUMENT_FILE_C_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 31 +#// +#// User [a] can only see [datasource_2:file_a] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_2_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ { "_source.title": "file_a" } ] +# }) + + +#// 32 +#// +#// User [b] cannot see [datasource_2], it can only see [datasource_1] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ { "_source.name": "$[[env.DATASOURCE_1_NAME]]" } ] +# }) + + +#// 33 +#// +#// User [d] cannot see [datasource_1, datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"hits.total.value": 0} ) \ No newline at end of file diff --git a/tests/datasource/scenario4/case1.dsl b/tests/datasource/scenario4/case1.dsl new file mode 100644 index 00000000..9a73eaf0 --- /dev/null +++ b/tests/datasource/scenario4/case1.dsl @@ -0,0 +1,244 @@ +#// Case 1: +#// 1. admin grants: +#// 1. user [a] [share] permission to document [datasource_1:file_a] +#// 2. user [a] [view] permission to datasource [datasource_1] +#// 2. User [a] has [share] permission to document [datasource_1:file_a] +#// 3. User [a] has [view] permission to document [datasource_1:file_b] +#// 4. User [a] has [view] permission to document [datasource_1:file_c] +#// 5. User [a] has [view] permission to document [datasource_1:file_d] + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Test +#// +#//---------------------------------------------------------------------------- + + +#// 3 +#// +#// [Admin] grants user [a] [Share] permission to document [datasource_1:file_a] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 4 +#// +#// [Admin] grants user [a] [view] permission to datasource [datasource_1] +POST /resources/datasource/$[[env.DATASOURCE_1_ID]]/share +{ + "shares": [ + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 5 +#// +#// List all permissions granted to [datasource_1:file_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 6 +#// +#// List all permissions granted to [datasource_1:file_b] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 7 +#// +#// List all permissions granted to [datasource_1:file_c] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_C_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 8 +#// +#// List all permissions granted to [datasource_1:file_d] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_D_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + diff --git a/tests/datasource/scenario4/case2.dsl b/tests/datasource/scenario4/case2.dsl new file mode 100644 index 00000000..772875c4 --- /dev/null +++ b/tests/datasource/scenario4/case2.dsl @@ -0,0 +1,244 @@ +#// Case 2: +#// 1. admin grants: +#// 1. user [a] [view] permission to datasource [datasource_1] +#// 2. user [a] [share] permission to document [datasource_1:file_a] +#// 2. User [a] has [share] permission to document [datasource_1:file_a] +#// 3. User [a] has [view] permission to document [datasource_1:file_b] +#// 4. User [a] has [view] permission to document [datasource_1:file_c] +#// 5. User [a] has [view] permission to document [datasource_1:file_d] + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Test +#// +#//---------------------------------------------------------------------------- + + +#// 3 +#// +#// [Admin] grants user [a] [view] permission to datasource [datasource_1] +POST /resources/datasource/$[[env.DATASOURCE_1_ID]]/share +{ + "shares": [ + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 4 +#// +#// [Admin] grants user [a] [Share] permission to document [datasource_1:file_a] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 5 +#// +#// List all permissions granted to [datasource_1:file_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 6 +#// +#// List all permissions granted to [datasource_1:file_b] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_B_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 7 +#// +#// List all permissions granted to [datasource_1:file_c] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_C_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 8 +#// +#// List all permissions granted to [datasource_1:file_d] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_D_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + diff --git a/tests/datasource/scenario4/case3.dsl b/tests/datasource/scenario4/case3.dsl new file mode 100644 index 00000000..94dd699d --- /dev/null +++ b/tests/datasource/scenario4/case3.dsl @@ -0,0 +1,208 @@ +#// Case 3: +#// 1. admin grants: +#// 1. user [a] [share] permission to document [datasource_1:file_a] +#// 2. user [a] [view] permission to datasource [datasource_1] +#// 2. admin revokes the permission to datasource [datasource_1] from user [a] +#// 3. User [a] has [share] permission to document [datasource_1:file_a] +#// 4. Document [datasource_1:file_a] is the only document in [datasource_1] +#// that user [a] can see + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Test +#// +#//---------------------------------------------------------------------------- + + +#// 3 +#// +#// [Admin] grants user [a] [Share] permission to document [datasource_1:file_a] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 4 +#// +#// [Admin] grants user [a] [view] permission to datasource [datasource_1] +POST /resources/datasource/$[[env.DATASOURCE_1_ID]]/share +{ + "shares": [ + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true +# }, +# +# register: [ +# { grant_user_admin_datasource_1_user_a: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 5 +#// +#// User [admin] revokes the [view] permission to datasource [datasource_1] from user [a] +POST /resources/datasource/$[[env.DATASOURCE_1_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_admin_datasource_1_user_a]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 6 +#// +#// List all permissions granted to [datasource_1:file_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 7 +#// +#// User [a] can only see [datasource_1:file_a] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_1_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ { "_source.title": "file_a" } ] +# }) \ No newline at end of file diff --git a/tests/datasource/scenario4/case4.dsl b/tests/datasource/scenario4/case4.dsl new file mode 100644 index 00000000..c605c634 --- /dev/null +++ b/tests/datasource/scenario4/case4.dsl @@ -0,0 +1,207 @@ +#// Case 4: +#// 1. admin grants: +#// 1. user [a] [view] permission to datasource [datasource_1] +#// 2. user [a] [share] permission to document [datasource_1:file_a] +#// 2. admin revokes the permission to datasource [datasource_1] from user [a] +#// 3. User [a] has [share] permission to document [datasource_1:file_a] +#// 4. Document [datasource_1:file_a] is the only document in [datasource_1] +#// that user [a] can see + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Test +#// +#//---------------------------------------------------------------------------- + +#// 3 +#// +#// [Admin] grants user [a] [view] permission to datasource [datasource_1] +POST /resources/datasource/$[[env.DATASOURCE_1_ID]]/share +{ + "shares": [ + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true +# }, +# +# register: [ +# { grant_user_admin_datasource_1_user_a: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 4 +#// +#// [Admin] grants user [a] [Share] permission to document [datasource_1:file_a] +POST /resources/document/$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]/share +{ + "shares": [ + { + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_type": "document", + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH]]", + "resource_full_path": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_PATH]]", + "resource_is_folder": false, + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 5 +#// +#// User [admin] revokes the [view] permission to datasource [datasource_1] from user [a] +POST /resources/datasource/$[[env.DATASOURCE_1_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_admin_datasource_1_user_a]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 6 +#// +#// List all permissions granted to [datasource_1:file_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.DATASOURCE_1_DOCUMENT_FILE_A_ID]]", + "resource_type": "document", + "resource_category_type": "datasource", + "resource_category_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "$[[env.DATASOURCE_1_PATH_WITH_TAILING_SLASH]]" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#// 7 +#// +#// User [a] can only see [datasource_1:file_a] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_1_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ { "_source.title": "file_a" } ] +# }) \ No newline at end of file diff --git a/tests/datasource/scenario5.dsl b/tests/datasource/scenario5.dsl new file mode 100644 index 00000000..b8bc1e7a --- /dev/null +++ b/tests/datasource/scenario5.dsl @@ -0,0 +1,942 @@ +#// Scenario 5: +#// +#// Test datasource owner could +#// 1. edit datasources +#// 2. delete datasources and documents +#// +#// And the changes are visible to other users. + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// User [admin] grants users [a,b,c,d] [view] permission to +#// [datasource_1,datasource_2], so that all the datasources/documents are visible +#// to these users. +#// +#//---------------------------------------------------------------------------- + +#// 6 +#// +#// User [admin] grants users [a,b,c,d] [view] permission to [datasource_1] +POST /resources/datasource/$[[env.DATASOURCE_1_ID]]/share +{ + "shares": [ + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + }, + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]] + }, + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.VIEW_ACCESS]] + }, + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true +# }, +# +# register: [ +# { grant_user_admin_datasource_1_user_a: "_ctx.response.body_json.created.0.id" }, +# { grant_user_admin_datasource_1_user_b: "_ctx.response.body_json.created.1.id" }, +# { grant_user_admin_datasource_1_user_c: "_ctx.response.body_json.created.2.id" }, +# { grant_user_admin_datasource_1_user_d: "_ctx.response.body_json.created.3.id" } +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.DATASOURCE_1_ID]]", +# "principal_id": "$[[env.D_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [admin] grants users [a,b,c,d] [view] permission to [datasource_2] +POST /resources/datasource/$[[env.DATASOURCE_2_ID]]/share +{ + "shares": [ + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_2_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + }, + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_2_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]] + }, + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_2_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.VIEW_ACCESS]] + }, + { + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_2_ID]]", + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true +# }, +# +# register: [ +# { grant_user_admin_datasource_2_user_a: "_ctx.response.body_json.created.0.id" }, +# { grant_user_admin_datasource_2_user_b: "_ctx.response.body_json.created.1.id" }, +# { grant_user_admin_datasource_2_user_c: "_ctx.response.body_json.created.2.id" }, +# { grant_user_admin_datasource_2_user_d: "_ctx.response.body_json.created.3.id" } +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.DATASOURCE_2_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.DATASOURCE_2_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.DATASOURCE_2_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.DATASOURCE_2_ID]]", +# "principal_id": "$[[env.D_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] disables datasource [datasource_1] +#// 2. Search using account [a], the search results only include documents from +#// [datasource_2] +#// 3. Search using account [b], the search results only include documents from +#// [datasource_2] +#// 4. Search using account [c], the search results only include documents from +#// [datasource_2] +#// 5. Search using account [d], the search results only include documents from +#// [datasource_2] +#// +#//---------------------------------------------------------------------------- + +#// 8 +#// +#// User [admin] disables datasource [datasource_1] +PUT /datasource/$[[env.DATASOURCE_1_ID]] +{ + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "connector": { + "id": "local_fs" + }, + "enabled": false, + "enrichment_pipeline": null, + "id": "$[[env.DATASOURCE_1_ID]]", + "name": "$[[env.DATASOURCE_1_NAME]]", + "sync": { + "enabled": false, + "interval": "1s", + "page_size": 0, + "strategy": "interval" + }, + "type": "connector", + "webhook": { + "enabled": false + }, + "_index": "$[[env.DATASOURCE_INDEX]]", + "_type": "_doc", + "shares": [ + { + "id": "$[[grant_user_admin_datasource_1_user_a]]", + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "/", + "resource_parent_path_reversed": "/", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]], + "entity": { + "type": "user", + "id": "$[[env.A_ID]]", + "icon": "circle-user", + "title": "$[[env.A_NAME]]", + "subtitle": "$[[env.A_MAIL]]" + } + }, + { + "id": "$[[grant_user_admin_datasource_1_user_b]]", + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "/", + "resource_parent_path_reversed": "/", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]], + "entity": { + "type": "user", + "id": "$[[env.B_ID]]", + "icon": "circle-user", + "title": "$[[env.B_NAME]]", + "subtitle": "$[[env.B_MAIL]]" + } + }, + { + "id": "$[[grant_user_admin_datasource_1_user_c]]", + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "/", + "resource_parent_path_reversed": "/", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.VIEW_ACCESS]], + "entity": { + "type": "user", + "id": "$[[env.C_ID]]", + "icon": "circle-user", + "title": "$[[env.C_NAME]]", + "subtitle": "$[[env.C_MAIL]]" + } + }, + { + "id": "$[[grant_user_admin_datasource_1_user_d]]", + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "/", + "resource_parent_path_reversed": "/", + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.VIEW_ACCESS]], + "entity": { + "type": "user", + "id": "$[[env.D_ID]]", + "icon": "circle-user", + "title": "$[[env.D_NAME]]", + "subtitle": "$[[env.D_MAIL]]" + } + } + ], + "owner": { + "type": "user", + "id": "$[[env.ADMIN_ID]]", + "icon": "circle-user", + "title": "$[[env.ADMIN_NAME]]", + "subtitle": "$[[env.ADMIN_MAIL]]" + }, + "editor": { + "type": "user", + "id": "$[[env.ADMIN_ID]]", + "icon": "circle-user", + "title": "$[[env.ADMIN_NAME]]", + "subtitle": "$[[env.ADMIN_MAIL]]" + } +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 9 +#// +#// Search using account [a] +POST /query/_search?query=file_a&size=100 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 4, +# "hits.hits": [ +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" } +# ] +# }) + + +#// 10 +#// +#// Search using account [b] +POST /query/_search?query=file_a&size=100 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 4, +# "hits.hits": [ +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" } +# ] +# }) + + +#// 11 +#// +#// Search using account [c] +POST /query/_search?query=file_a&size=100 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 4, +# "hits.hits": [ +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" } +# ] +# }) + + +#// 12 +#// +#// Search using account [d] +POST /query/_search?query=file_a&size=100 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 4, +# "hits.hits": [ +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" }, +# {"_source.category": "$[[env.DATASOURCE_2_PATH_WITH_TAILING_SLASH]]" } +# ] +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [admin] renames datasource [datasource_1] [datasource_A] +#// 2. Users [a,b,c,d] now see [datasource_A] +#// +#//---------------------------------------------------------------------------- + + +#// 13 +#// +#// [admin] renames datasource [datasource_1] [datasource_A] +PUT /datasource/$[[env.DATASOURCE_1_ID]] +{ + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "connector": { + "id": "local_fs" + }, + "enabled": false, + "enrichment_pipeline": null, + "id": "$[[env.DATASOURCE_1_ID]]", + "name": "datasource_A", + "sync": { + "enabled": false, + "interval": "1s", + "page_size": 0, + "strategy": "interval" + }, + "type": "connector", + "webhook": { + "enabled": false + }, + "_index": "$[[env.DATASOURCE_INDEX]]", + "_type": "_doc", + "shares": [ + { + "id": "$[[grant_user_admin_datasource_1_user_a]]", + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "/", + "resource_parent_path_reversed": "/", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]], + "entity": { + "type": "user", + "id": "$[[env.A_ID]]", + "icon": "circle-user", + "title": "$[[env.A_NAME]]", + "subtitle": "$[[env.A_MAIL]]" + } + }, + { + "id": "$[[grant_user_admin_datasource_1_user_b]]", + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "/", + "resource_parent_path_reversed": "/", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]], + "entity": { + "type": "user", + "id": "$[[env.B_ID]]", + "icon": "circle-user", + "title": "$[[env.B_NAME]]", + "subtitle": "$[[env.B_MAIL]]" + } + }, + { + "id": "$[[grant_user_admin_datasource_1_user_c]]", + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "/", + "resource_parent_path_reversed": "/", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.VIEW_ACCESS]], + "entity": { + "type": "user", + "id": "$[[env.C_ID]]", + "icon": "circle-user", + "title": "$[[env.C_NAME]]", + "subtitle": "$[[env.C_MAIL]]" + } + }, + { + "id": "$[[grant_user_admin_datasource_1_user_d]]", + "_system": { + "owner_id": "$[[env.ADMIN_ID]]" + }, + "resource_category_type": "connector", + "resource_category_id": "local_fs", + "resource_type": "datasource", + "resource_id": "$[[env.DATASOURCE_1_ID]]", + "resource_parent_path": "/", + "resource_parent_path_reversed": "/", + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.VIEW_ACCESS]], + "entity": { + "type": "user", + "id": "$[[env.D_ID]]", + "icon": "circle-user", + "title": "$[[env.D_NAME]]", + "subtitle": "$[[env.D_MAIL]]" + } + } + ], + "owner": { + "type": "user", + "id": "$[[env.ADMIN_ID]]", + "icon": "circle-user", + "title": "$[[env.ADMIN_NAME]]", + "subtitle": "$[[env.ADMIN_MAIL]]" + }, + "editor": { + "type": "user", + "id": "$[[env.ADMIN_ID]]", + "icon": "circle-user", + "title": "$[[env.ADMIN_NAME]]", + "subtitle": "$[[env.ADMIN_MAIL]]" + } +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + + +#// 14 +#// +#// User [a] sees [datasource_A] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 2, +# "hits.hits": [ +# { "_source.name": "$[[env.DATASOURCE_2_NAME]]" }, +# { "_source.name": "datasource_A" }, +# ] +#} ) + + +#// 15 +#// +#// User [b] sees [datasource_A] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 2, +# "hits.hits": [ +# { "_source.name": "$[[env.DATASOURCE_2_NAME]]" }, +# { "_source.name": "datasource_A" }, +# ] +#} ) + + +#// 16 +#// +#// User [c] sees [datasource_A] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 2, +# "hits.hits": [ +# { "_source.name": "$[[env.DATASOURCE_2_NAME]]" }, +# { "_source.name": "datasource_A" }, +# ] +#} ) + + +#// 17 +#// +#// User [d] sees [datasource_A] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 2, +# "hits.hits": [ +# { "_source.name": "$[[env.DATASOURCE_2_NAME]]" }, +# { "_source.name": "datasource_A" }, +# ] +#} ) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [admin] deletes document [datasource_2:file_a] +#// 2. Users [a,b,c,d] cannot see [datasource_2:file_a] any longer +#// +#//---------------------------------------------------------------------------- + +#// 18 +#// +#// User [admin] deletes document [datasource_2:file_a] +DELETE /document/$[[env.DATASOURCE_2_DOCUMENT_FILE_A_ID]] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: { "_ctx.response.status": 200 } + +#// 19 +#// +#// User [a] cannot see [datasource_2:file_a] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_2_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { +# "hits.total.value": 3, +# "hits.hits": [ +# { "_source.title": "file_b" }, +# { "_source.title": "file_c" }, +# { "_source.title": "file_d" } +# ] +# }) + + +#// 20 +#// +#// User [b] cannot see [datasource_2:file_a] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_2_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { +# "hits.total.value": 3, +# "hits.hits": [ +# { "_source.title": "file_b" }, +# { "_source.title": "file_c" }, +# { "_source.title": "file_d" } +# ] +# }) + + +#// 21 +#// +#// User [c] cannot see [datasource_2:file_a] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_2_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { +# "hits.total.value": 3, +# "hits.hits": [ +# { "_source.title": "file_b" }, +# { "_source.title": "file_c" }, +# { "_source.title": "file_d" } +# ] +# }) + + +#// 22 +#// +#// User [d] cannot see [datasource_2:file_a] +GET /document/_search?filter=source.id:any($[[env.DATASOURCE_2_ID]])&from=0&size=100&query=file +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# assert: (200, { +# "hits.total.value": 3, +# "hits.hits": [ +# { "_source.title": "file_b" }, +# { "_source.title": "file_c" }, +# { "_source.title": "file_d" } +# ] +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 4: +#// 1. User [admin] deletes datasource [datasource_2] +#// 2. Users [a,b,c,d] cannot see [datasource_2] any longer +#// +#//---------------------------------------------------------------------------- + +#// 23 +#// +#// User [admin] deletes datasource [datasource_2] +DELETE /datasource/$[[env.DATASOURCE_2_ID]] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.DATASOURCE_2_ID]]","result":"deleted"} ) + + +#// 24 +#// +#// User [a] cannot see [datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "datasource_A" }, +# ] +#} ) + + +#// 25 +#// +#// User [b] cannot see [datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "datasource_A" }, +# ] +#} ) + + +#// 26 +#// +#// User [c] cannot see [datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "datasource_A" }, +# ] +#} ) + + +#// 27 +#// +#// User [d] cannot see [datasource_2] +GET /datasource/_search +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "datasource_A" }, +# ] +#} ) \ No newline at end of file diff --git a/tests/llm/scenario1.dsl b/tests/llm/scenario1.dsl new file mode 100644 index 00000000..2258c459 --- /dev/null +++ b/tests/llm/scenario1.dsl @@ -0,0 +1,286 @@ +#// Scenario 1: +#// +#// Owner (admin) grants other users different permissions to LLM provider + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1 +#// 1. User [admin] grants user [a] [view] permission to [llm_a] +#// 2. User [admin] grants user [b] [edit] permission to [llm_b] +#// 3. User [admin] grants user [c] [share] permission to [llm_c] +#// 4. User [admin] grants user [d] [view] permission to [llm_d] +#// 5. Users [a, b, c, d] have the corresponding permissions +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [view] permission to [llm_a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [admin] grants user [b] [edit] permission to [llm_b] +POST /resources/llm-provider/$[[env.LLM_B_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_B_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_B_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 8 +#// +#// User [admin] grants user [c] [share] permission to [llm_c] +POST /resources/llm-provider/$[[env.LLM_C_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_C_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_C_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// User [admin] grants user [d] [view] permission to [llm_d] +POST /resources/llm-provider/$[[env.LLM_D_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_D_ID]]", + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_D_ID]]", +# "principal_id": "$[[env.D_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 10 +#// +#// Users [a, b, c, d] have the corresponding permissions +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.LLM_A_ID]]", + "resource_type": "llm-provider" + }, + { + "resource_id": "$[[env.LLM_B_ID]]", + "resource_type": "llm-provider" + }, + { + "resource_id": "$[[env.LLM_C_ID]]", + "resource_type": "llm-provider" + }, + { + "resource_id": "$[[env.LLM_D_ID]]", + "resource_type": "llm-provider" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.LLM_B_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.LLM_C_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# }, +# { +# "resource_id": "$[[env.LLM_D_ID]]", +# "principal_id": "$[[env.D_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ]) \ No newline at end of file diff --git a/tests/llm/scenario2.dsl b/tests/llm/scenario2.dsl new file mode 100644 index 00000000..c795c914 --- /dev/null +++ b/tests/llm/scenario2.dsl @@ -0,0 +1,571 @@ +#// Scenario 2: +#// +#// Users with [share] permission can grant other users permission. + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] grants user [a] [share] permission to [llm_a] +#// 2. User [a] have the corresponding permission +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [share] permission to [llm_a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [a] has the corresponding permission +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.LLM_A_ID]]", + "resource_type": "llm-provider" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] grants: +#// 1. [edit] permission of [llm_a] to user [b] +#// 2. [share] permission of [llm_a] to user [c] +#// 2. Users [b, c] have the corresponding permission +#// 3. User [d] don't have access to [llm_a] +#// +#//---------------------------------------------------------------------------- + + +#// 8 +#// +#// User [a] grants user [b] [edit] permission to [llm_a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_llm_a_user_b: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// User [a] grants user [c] [share] permission to [llm_a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_llm_a_user_c: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 10 +#// +#// Users [b, c] have the corresponding permissions +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.LLM_A_ID]]", + "resource_type": "llm-provider" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# }, +# { +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# }, +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 11 +#// +#// User [d] cannot see llm provider [llm_a] +GET /model_provider/_search?&from=0&size=100&query=model_provider +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [c] grants user [a] [edit] permission to model provider [llm_a] +#// 3. Verify the permissions granted on [llm_a]: +#// a: edit +#// b: edit +#// c: share +#// 4. Verify that [llm_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 12 +#// +#// User [c] grants user [a] [edit] permission to llm provider [llm_a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# sleep: { +# "sleep_in_milli_seconds": 1000 +# }, +# +# register: [ +# { grant_user_c_llm_a_user_a: "_ctx.response.body_json.updated.0.id" }, +# ], +# +# assert: (200, { +# "updated": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 13 +#// +#// Verify the permissions granted on [llm_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.LLM_A_ID]]", + "resource_type": "llm-provider" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# }, +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# ) + + +#// 14 +#// +#// User [d] cannot see llm provider [llm_a] +GET /model_provider/_search?&from=0&size=100&query=model_provider +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 4: +#// 1. User [admin] revokes the [edit] permission to [llm_a] from user [a] +#// 2. User [admin] revokes the [view] permission to [llm_a] from user [b] +#// 3. User [admin] revokes the [share] permission to [llm_a] from user [c] +#// 4. Verify that [llm_a] is invisible to users [a, b, c] +#// +#//---------------------------------------------------------------------------- + + +#// 15 +#// +#// User [admin] revokes the [edit] permission of [llm_a] from user [a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_c_llm_a_user_a]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 16 +#// +#// User [admin] revokes the [edit] permission of [llm_a] from user [b] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_llm_a_user_b]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 17 +#// +#// User [admin] revokes the [share] permission of [llm_a] from user [c] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_llm_a_user_c]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + +#// 18 +#// +#// User [a] cannot see llm provider [llm_a] +GET /model_provider/_search?&from=0&size=100&query=model_provider +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 19 +#// +#// User [b] cannot see llm provider [llm_a] +GET /model_provider/_search?&from=0&size=100&query=model_provider +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 20 +#// +#// User [c] cannot see llm provider [llm_a] +GET /model_provider/_search?&from=0&size=100&query=model_provider +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 21 +#// +#// User [d] cannot see llm provider [llm_a] +GET /model_provider/_search?&from=0&size=100&query=model_provider +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + diff --git a/tests/llm/scenario3.dsl b/tests/llm/scenario3.dsl new file mode 100644 index 00000000..251b5bca --- /dev/null +++ b/tests/llm/scenario3.dsl @@ -0,0 +1,439 @@ +#// Scenario 3: +#// +#// Users with [edit] permission can modify LLM provider settings + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] grants user [a] [edit] permission to [llm_a] +#// 2. User [admin] grants user [b] [view] permission to [llm_a] +#// 3. User [admin] grants user [c] [share] permission to [llm_a] +#// 4. Users [a, b, c] have the corresponding permission +#// 5. [llm_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [edit] permission to [llm_a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [admin] grants user [b] [view] permission to [llm_a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 8 +#// +#// User [admin] grants user [c] [share] permission to [llm_a] +POST /resources/llm-provider/$[[env.LLM_A_ID]]/share +{ + "shares": [ + { + "resource_type": "llm-provider", + "resource_id": "$[[env.LLM_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// Verify that users [a, b, c] have the corresponding permission +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.LLM_A_ID]]", + "resource_type": "llm-provider" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.LLM_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ]) + + +#// 10 +#// +#// User [d] cannot see llm provider [llm_a] +GET /model_provider/_search?&from=0&size=100&query=llm_a&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] renames [llm_a] [llms_1] +#// 2. User [b, c] can see [llms_1] +#// 3. User [d] cannot see [llms_1] +#// +#//---------------------------------------------------------------------------- + + +#// 11 +#// +#// User [a] renames [llm_a] [llms_1] +PUT /model_provider/$[[env.LLM_A_ID]] +{ + "name": "llms_1", + "icon": "font_Qianfan", + "api_type": "ollama", + "api_key": "", + "base_url": "http://s", + "models": [ + { + "name": "s", + "settings": { + "reasoning": false, + "temperature": 0.7, + "top_p": 0.9, + "presence_penalty": 0, + "frequency_penalty": 0, + "max_tokens": 4000, + "max_length": 0 + } + } + ], + "description": "", + "enabled": true +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.LLM_A_ID]]","result":"updated"}) + + +#// 12 +#// +#// User [b] can see [llms_1] +GET /model_provider/_search?&from=0&size=100&query=llms_1&t=1763461094531 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "llms_1" } +# ] +# }) + + +#// 13 +#// +#// User [c] can see [llms_1] +GET /model_provider/_search?&from=0&size=100&query=llms_1&t=1763461094532 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "llms_1" } +# ] +# }) + + +#// 14 +#// +#// User [d] cannot see [llms_1] +GET /model_provider/_search?&from=0&size=100&query=llms_1&t=1763461094533 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [admin] deletes [llms_1] +#// 2. [llms_1] is invisible to users [a, b, c, d] +#// +#//---------------------------------------------------------------------------- + + +#// 15 +#// +#// User [admin] deletes [llms_1] +DELETE /model_provider/$[[env.LLM_A_ID]] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.LLM_A_ID]]","result":"deleted"}) + + +#// 16 +#// +#// User [a] cannot see [llms_1] +GET /model_provider/_search?&from=0&size=100&query=llms_1&t=1763461094534 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 17 +#// +#// User [b] cannot see [llms_1] +GET /model_provider/_search?&from=0&size=100&query=llms_1&t=1763461094535 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 18 +#// +#// User [c] cannot see [llms_1] +GET /model_provider/_search?&from=0&size=100&query=llms_1&t=1763461094536 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 19 +#// +#// User [d] cannot see [llms_1] +GET /model_provider/_search?&from=0&size=100&query=llms_1&t=1763461094537 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) diff --git a/tests/llm/test.sh b/tests/llm/test.sh new file mode 100644 index 00000000..ca9b81da --- /dev/null +++ b/tests/llm/test.sh @@ -0,0 +1 @@ +loadgen -config ../loadgen.yml -run scenario3.dsl -debug diff --git a/tests/loadgen.yml b/tests/loadgen.yml new file mode 100644 index 00000000..1c8ff9d6 --- /dev/null +++ b/tests/loadgen.yml @@ -0,0 +1,116 @@ +runner: + total_rounds: 1 + no_warm: true + reset_context: true + log_requests: false + assert_invalid: true + default_endpoint: "$[[env.COCO_SERVER]]" + +env: + COCO_SERVER: http://127.0.0.1:9000 + + + # + # Datasources and Documents + # + DATASOURCE_1_ID: 'd4cngvq8sig62phqk95g' + DATASOURCE_1_NAME: 'datasource_1' + DATASOURCE_1_PATH: '/tmp/datasource_1' + DATASOURCE_1_PATH_WITH_TAILING_SLASH: '/tmp/datasource_1/' + DATASOURCE_2_ID: 'd4cnh5i8sig62phqk9a0' + DATASOURCE_2_NAME: 'datasource_2' + DATASOURCE_2_PATH: '/tmp/datasource_2' + DATASOURCE_2_PATH_WITH_TAILING_SLASH: '/tmp/datasource_2/' + + DATASOURCE_1_DOCUMENT_FILE_A_ID: '497d8b408d2e90bb6a864e4a0dca048d' + DATASOURCE_1_DOCUMENT_FILE_A_PATH: '/tmp/datasource_1/file_a' + DATASOURCE_1_DOCUMENT_FILE_B_ID: 'dda5b3b6c06214e38cc68c9e9f0dc2a8' + DATASOURCE_1_DOCUMENT_FILE_B_PATH: '/tmp/datasource_1/file_b' + DATASOURCE_1_DOCUMENT_FILE_C_ID: '0fc4351430af24ab77b5de5f02c0cc07' + DATASOURCE_1_DOCUMENT_FILE_C_PATH: '/tmp/datasource_1/file_c' + DATASOURCE_1_DOCUMENT_FILE_D_ID: 'b0d7d879b9cf238bb1f1a3ba312500b0' + DATASOURCE_1_DOCUMENT_FILE_D_PATH: '/tmp/datasource_1/file_d' + + DATASOURCE_2_DOCUMENT_FILE_A_ID: '6d7e0a7296d11c5757ddc96817954a97' + DATASOURCE_2_DOCUMENT_FILE_A_PATH: '/tmp/datasource_2/file_a' + DATASOURCE_2_DOCUMENT_FILE_B_ID: 'b9eed8060ba0f13c613dd4b30767a217' + DATASOURCE_2_DOCUMENT_FILE_B_PATH: '/tmp/datasource_2/file_b' + DATASOURCE_2_DOCUMENT_FILE_C_ID: '0472fceb8960cb294af0087d71bfd197' + DATASOURCE_2_DOCUMENT_FILE_C_PATH: '/tmp/datasource_2/file_c' + DATASOURCE_2_DOCUMENT_FILE_D_ID: '80d014860118e726feb6e7fcb02f034d' + DATASOURCE_2_DOCUMENT_FILE_D_PATH: '/tmp/datasource_2/file_d' + + + # + # Users and passwords + # + ADMIN_ID: '2305b68a5c7204872dfee9be863db254' + A_ID: 'dd3626ce78553287cd9216f4e4974d26' + B_ID: '59a0b6a30bc2d87d414f1be3056a637e' + C_ID: 'c5e8feedee98778d172a3569f2050e29' + D_ID: 'd61b234afd94afd00152ea7bfaf92c31' + ADMIN_NAME: 'admin' + A_NAME: 'a' + B_NAME: 'b' + C_NAME: 'c' + D_NAME: 'd' + ADMIN_MAIL: 'admin@mail.com' + A_MAIL: 'a@mail.com' + B_MAIL: 'b@mail.com' + C_MAIL: 'c@mail.com' + D_MAIL: 'd@mail.com' + ADMIN_PASSWORD: 'PASSword_123' + A_PASSWORD: 'PASSword_123' + B_PASSWORD: 'PASSword_123' + C_PASSWORD: 'PASSword_123' + D_PASSWORD: 'PASSword_123' + + # + # Permission + # + VIEW_ACCESS: 1 + EDIT_ACCESS: 4 + COMMENT_ACCESS: 16? + SHARE_ACCESS: 8 + + # + # Easysearch index + # + DATASOURCE_INDEX: 'coco_datasource-v2' + + # + # AI Assistant + # + AICHAT_A_ID: 'd4cnic28sig62phqk9o0' + AICHAT_B_ID: 'd4cnie28sig62phqk9p0' + AICHAT_C_ID: 'd4cnijq8sig62phqk9rg' + AICHAT_D_ID: 'd4cnimi8sig62phqk9sg' + + AICHAT_A_NAME: 'aichat_a' + AICHAT_B_NAME: 'aichat_b' + AICHAT_C_NAME: 'aichat_c' + AICHAT_D_NAME: 'aichat_d' + + # + # mcp + # + MCP_A_ID: 'd4cnji28sig62phqka6g' + MCP_B_ID: 'd4cnjma8sig62phqka7g' + MCP_C_ID: 'd4cnjpq8sig62phqka9g' + MCP_D_ID: 'd4cnjsq8sig62phqkaag' + + # + # LLM + # + LLM_A_ID: 'd4cnisa8sig62phqk9ug' + LLM_B_ID: 'd4cnj0q8sig62phqka0g' + LLM_C_ID: 'd4cnj528sig62phqka1g' + LLM_D_ID: 'd4cnj9a8sig62phqka3g' + + # + # Widget + # + WIDGET_A_ID: 'd4cnk328sig62phqkacg' + WIDGET_B_ID: 'd4cnk8a8sig62phqkaf0' + WIDGET_C_ID: 'd4cnkbi8sig62phqkag0' + WIDGET_D_ID: 'd4cnkf28sig62phqkahg' diff --git a/tests/mcp/scenario1.dsl b/tests/mcp/scenario1.dsl new file mode 100644 index 00000000..29857ead --- /dev/null +++ b/tests/mcp/scenario1.dsl @@ -0,0 +1,283 @@ +#// Scenario 1: +#// +#// Owner (admin) grants other users different permissions to MCP servers + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1 +#// 1. User [admin] grants user [a] [view] permission to [mcp_server_a] +#// 2. User [admin] grants user [b] [edit] permission to [mcp_server_b] +#// 3. User [admin] grants user [c] [share] permission to [mcp_server_c] +#// 4. User [admin] grants user [d] [view] permission to [mcp_server_d] +#// 5. Users [a, b, c, d] have the corresponding permissions +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [view] permission to [mcp_server_a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [admin] grants user [b] [edit] permission to [mcp_server_b] +POST /resources/mcp-server/$[[env.MCP_B_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_B_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_B_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 8 +#// +#// User [admin] grants user [c] [share] permission to [mcp_server_c] +POST /resources/mcp-server/$[[env.MCP_C_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_C_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_C_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// User [admin] grants user [d] [view] permission to [mcp_server_d] +POST /resources/mcp-server/$[[env.MCP_D_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_D_ID]]", + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_D_ID]]", +# "principal_id": "$[[env.D_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 10 +#// +#// Users [a, b, c, d] have the corresponding permissions +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.MCP_A_ID]]", + "resource_type": "mcp-server" + }, + { + "resource_id": "$[[env.MCP_B_ID]]", + "resource_type": "mcp-server" + }, + { + "resource_id": "$[[env.MCP_C_ID]]", + "resource_type": "mcp-server" + }, + { + "resource_id": "$[[env.MCP_D_ID]]", + "resource_type": "mcp-server" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# }, +# { +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# }, +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# }, +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.D_ID]]" +# } +# ]) \ No newline at end of file diff --git a/tests/mcp/scenario2.dsl b/tests/mcp/scenario2.dsl new file mode 100644 index 00000000..1b0db732 --- /dev/null +++ b/tests/mcp/scenario2.dsl @@ -0,0 +1,569 @@ +#// Scenario 2: +#// +#// Users with [share] permission can grant other users permission. + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] grants user [a] [share] permission to [mcp_server_a] +#// 2. User [a] have the corresponding permission +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [share] permission to [mcp_server_a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [a] has the corresponding permission +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.MCP_A_ID]]", + "resource_type": "mcp-server" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] grants: +#// 1. [edit] permission of [mcp_server_a] to user [b] +#// 2. [share] permission of [mcp_server_a] to user [c] +#// 2. Users [b, c] have the corresponding permission +#// 3. User [d] don't have access to [mcp_server_a] +#// +#//---------------------------------------------------------------------------- + + +#// 8 +#// +#// User [a] grants user [b] [edit] permission to [mcp_server_a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_mcp_a_user_b: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// User [a] grants user [c] [share] permission to [mcp_server_a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_mcp_a_user_c: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 10 +#// +#// Users [b, c] have the corresponding permissions +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.MCP_A_ID]]", + "resource_type": "mcp-server" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# }, +# { +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# }, +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 11 +#// +#// User [d] cannot see mcp server [mcp_server_a] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [c] grants user [a] [edit] permission to assistant [mcp_server_a] +#// 3. Verify the permissions granted on [mcp_server_a]: +#// a: edit +#// b: edit +#// c: share +#// 4. Verify that [mcp_server_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 12 +#// +#// User [c] grants user [a] [edit] permission to mcp server [mcp_server_a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# sleep: { +# "sleep_in_milli_seconds": 1000 +# }, +# +# register: [ +# { grant_user_c_mcp_a_user_a: "_ctx.response.body_json.updated.0.id" }, +# ], +# +# assert: (200, { +# "updated": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 13 +#// +#// Verify the permissions granted on [mcp_server_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.MCP_A_ID]]", + "resource_type": "mcp-server" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# }, +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# ) + + +#// 14 +#// +#// User [d] cannot see mcp server [mcp_server_a] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 4: +#// 1. User [admin] revokes the [edit] permission to [mcp_server_a] from user [a] +#// 2. User [admin] revokes the [view] permission to [mcp_server_a] from user [b] +#// 3. User [admin] revokes the [share] permission to [mcp_server_a] from user [c] +#// 4. Verify that [mcp_server_a] is invisible to users [a, b, c] +#// +#//---------------------------------------------------------------------------- + + +#// 15 +#// +#// User [admin] revokes the [edit] permission of [mcp_server_a] from user [a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_c_mcp_a_user_a]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 16 +#// +#// User [admin] revokes the [edit] permission of [mcp_server_a] from user [b] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_mcp_a_user_b]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 17 +#// +#// User [admin] revokes the [share] permission of [mcp_server_a] from user [c] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_mcp_a_user_c]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + +#// 18 +#// +#// User [b] cannot see mcp server [mcp_server_a] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + +#// 19 +#// +#// User [b] cannot see mcp server [mcp_server_a] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 20 +#// +#// User [c] cannot see mcp server [mcp_server_a] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 21 +#// +#// User [d] cannot see mcp server [mcp_server_a] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) \ No newline at end of file diff --git a/tests/mcp/scenario3.dsl b/tests/mcp/scenario3.dsl new file mode 100644 index 00000000..cb890e33 --- /dev/null +++ b/tests/mcp/scenario3.dsl @@ -0,0 +1,429 @@ + +#// Scenario 3: +#// +#// Users with [edit] permission can modify MCP server settings + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] grants user [a] [edit] permission to [mcp_server_a] +#// 2. User [admin] grants user [b] [view] permission to [mcp_server_a] +#// 3. User [admin] grants user [c] [share] permission to [mcp_server_a] +#// 4. Users [a, b, c] have the corresponding permission +#// 5. [mcp_server_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [edit] permission to [mcp_server_a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [admin] grants user [b] [view] permission to [mcp_server_a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 8 +#// +#// User [admin] grants user [c] [share] permission to [mcp_server_a] +POST /resources/mcp-server/$[[env.MCP_A_ID]]/share +{ + "shares": [ + { + "resource_type": "mcp-server", + "resource_id": "$[[env.MCP_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// Verify that users [a, b, c] have the corresponding permission +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.MCP_A_ID]]", + "resource_type": "mcp-server" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.MCP_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ]) + + +#// 10 +#// +#// User [d] cannot see mcp server [mcp_server_a] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server_a&t=1763461094530 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] renames [mcp_server_a] [mcp_server_1] +#// 2. User [b, c] can see [mcp_server_1] +#// 3. User [d] cannot see [mcp_server_1] +#// +#//---------------------------------------------------------------------------- + + +#// 11 +#// +#// User [a] renames [mcp_server_a] [mcp_server_1] +PUT /mcp_server/$[[env.MCP_A_ID]] +{ + "id": "$[[env.MCP_A_ID]]", + "name": "mcp_server_1", + "icon": "font_VolcanoArk", + "category": "Network Tools", + "type": "streamable_http", + "enabled": true, + "config": { + "url": "htp://a" + }, + "datasource": {} +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.MCP_A_ID]]","result":"updated"}) + + +#// 12 +#// +#// User [b] can see [mcp_server_1] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server_1&t=1763461094531 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "mcp_server_1" } +# ] +# }) + + +#// 13 +#// +#// User [c] can see [mcp_server_1] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server_1&t=1763461094532 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": "mcp_server_1" } +# ] +# }) + + +#// 14 +#// +#// User [d] cannot see [mcp_server_1] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server_1&t=1763461094533 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [admin] deletes [mcp_server_1] +#// 2. [mcp_server_1] is invisible to users [a, b, c, d] +#// +#//---------------------------------------------------------------------------- + + +#// 15 +#// +#// User [admin] deletes [mcp_server_1] +DELETE /mcp_server/$[[env.MCP_A_ID]] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.MCP_A_ID]]","result":"deleted"}) + + +#// 16 +#// +#// User [a] cannot see [mcp_server_1] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server_1&t=1763461094534 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 17 +#// +#// User [b] cannot see [mcp_server_1] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server_1&t=1763461094535 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 18 +#// +#// User [c] cannot see [mcp_server_1] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server_1&t=1763461094536 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 19 +#// +#// User [d] cannot see [mcp_server_1] +GET /mcp_server/_search?&from=0&size=100&query=mcp_server_1&t=1763461094537 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) diff --git a/tests/mcp/test.sh b/tests/mcp/test.sh new file mode 100644 index 00000000..ca9b81da --- /dev/null +++ b/tests/mcp/test.sh @@ -0,0 +1 @@ +loadgen -config ../loadgen.yml -run scenario3.dsl -debug diff --git a/tests/widget/scenario1.dsl b/tests/widget/scenario1.dsl new file mode 100644 index 00000000..2456fe20 --- /dev/null +++ b/tests/widget/scenario1.dsl @@ -0,0 +1,283 @@ +#// Scenario 1: +#// +#// Owner (admin) grants other users different permissions to widgets + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1 +#// 1. User [admin] grants user [a] [view] permission to [widget_a] +#// 2. User [admin] grants user [b] [edit] permission to [widget_b] +#// 3. User [admin] grants user [c] [share] permission to [widget_c] +#// 4. User [admin] grants user [d] [view] permission to [widget_d] +#// 5. Users [a, b, c, d] have the corresponding permissions +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [view] permission to [widget_a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [admin] grants user [b] [edit] permission to [widget_b] +POST /resources/integration/$[[env.WIDGET_B_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_B_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_B_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 8 +#// +#// User [admin] grants user [c] [share] permission to [widget_c] +POST /resources/integration/$[[env.WIDGET_C_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_C_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_C_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// User [admin] grants user [d] [view] permission to [widget_d] +POST /resources/integration/$[[env.WIDGET_D_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_D_ID]]", + "principal_type": "user", + "principal_id": "$[[env.D_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_D_ID]]", +# "principal_id": "$[[env.D_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 10 +#// +#// Users [a, b, c, d] have the corresponding permissions +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.WIDGET_A_ID]]", + "resource_type": "integration" + }, + { + "resource_id": "$[[env.WIDGET_B_ID]]", + "resource_type": "integration" + }, + { + "resource_id": "$[[env.WIDGET_C_ID]]", + "resource_type": "integration" + }, + { + "resource_id": "$[[env.WIDGET_D_ID]]", + "resource_type": "integration" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# }, +# { +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# }, +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# }, +# { +# "permission": $[[env.VIEW_ACCESS]], +# "principal_id": "$[[env.D_ID]]" +# } +# ]) diff --git a/tests/widget/scenario2.dsl b/tests/widget/scenario2.dsl new file mode 100644 index 00000000..6769bf6c --- /dev/null +++ b/tests/widget/scenario2.dsl @@ -0,0 +1,570 @@ +#// Scenario 2: +#// +#// Users with [share] permission can grant other users permission. + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] grants user [a] [share] permission to [widget_a] +#// 2. User [a] have the corresponding permission +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [share] permission to [widget_a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [a] has the corresponding permission +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.WIDGET_A_ID]]", + "resource_type": "integration" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ]) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] grants: +#// 1. [edit] permission of [widget_a] to user [b] +#// 2. [share] permission of [widget_a] to user [c] +#// 2. Users [b, c] have the corresponding permission +#// 3. User [d] don't have access to [widget_a] +#// +#//---------------------------------------------------------------------------- + + +#// 8 +#// +#// User [a] grants user [b] [edit] permission to [widget_a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_widget_a_user_b: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// User [a] grants user [c] [share] permission to [widget_a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# register: [ +# { grant_user_a_widget_a_user_c: "_ctx.response.body_json.created.0.id" }, +# ], +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 10 +#// +#// Users [b, c] have the corresponding permissions +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.WIDGET_A_ID]]", + "resource_type": "integration" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, +# [ +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# }, +# { +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# }, +# { +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ]) + + +#// 11 +#// +#// User [d] cannot see widget [widget_a] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget&t=1763624116683 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [c] grants user [a] [edit] permission to [widget_a] +#// 3. Verify the permissions granted on [widget_a]: +#// a: edit +#// b: edit +#// c: share +#// 4. Verify that [widget_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 12 +#// +#// User [c] grants user [a] [edit] permission to [widget_a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# sleep: { +# "sleep_in_milli_seconds": 1000 +# }, +# +# register: [ +# { grant_user_c_widget_a_user_a: "_ctx.response.body_json.updated.0.id" }, +# ], +# +# assert: (200, { +# "updated": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 13 +#// +#// Verify the permissions granted on [widget_a] +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.WIDGET_A_ID]]", + "resource_type": "integration" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# }, +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ]) + + +#// 14 +#// +#// User [d] cannot see widget [widget_a] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget&t=1763624116683 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 4: +#// 1. User [admin] revokes the [edit] permission to [widget_a] from user [a] +#// 2. User [admin] revokes the [edit] permission to [widget_a] from user [b] +#// 3. User [admin] revokes the [share] permission to [widget_a] from user [c] +#// 4. Verify that [widget_a] is invisible to users [a, b, c] +#// +#//---------------------------------------------------------------------------- + + +#// 15 +#// +#// User [admin] revokes the [edit] permission of [widget_a] from user [a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_c_widget_a_user_a]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.A_ID]]" +# } +# ] +# }) + + +#// 16 +#// +#// User [admin] revokes the [edit] permission of [widget_a] from user [b] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_widget_a_user_b]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "permission": $[[env.EDIT_ACCESS]], +# "principal_id": "$[[env.B_ID]]" +# } +# ] +# }) + + +#// 17 +#// +#// User [admin] revokes the [share] permission of [widget_a] from user [c] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "revokes": [ + { + "id": "$[[grant_user_a_widget_a_user_c]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "deleted": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "permission": $[[env.SHARE_ACCESS]], +# "principal_id": "$[[env.C_ID]]" +# } +# ] +# }) + + +#// 18 +#// +#// User [a] cannot see widget [widget_a] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget&t=1763624116683 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 19 +#// +#// User [b] cannot see widget [widget_a] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget&t=1763624116683 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 20 +#// +#// User [c] cannot see widget [widget_a] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget&t=1763624116683 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 21 +#// +#// User [d] cannot see widget [widget_a] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget&t=1763624116683 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) diff --git a/tests/widget/scenario3.dsl b/tests/widget/scenario3.dsl new file mode 100644 index 00000000..584d20df --- /dev/null +++ b/tests/widget/scenario3.dsl @@ -0,0 +1,469 @@ +#// Scenario 3: +#// +#// Users with [edit] permission can modify widget settings + + +#//---------------------------------------------------------------------------- +#// +#// Login +#// +#//---------------------------------------------------------------------------- + + +#// 1 +#// +#// Log in to account admin +POST /account/login +{ + "email": "admin@mail.com", + "password": "$[[env.ADMIN_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { admin_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 2 +#// +#// Log in to account a +POST /account/login +{ + "email": "a@mail.com", + "password": "$[[env.A_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { a_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 3 +#// +#// Log in to account b +POST /account/login +{ + "email": "b@mail.com", + "password": "$[[env.B_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { b_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 4 +#// +#// Log in to account c +POST /account/login +{ + "email": "c@mail.com", + "password": "$[[env.C_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { c_token: "_ctx.response.body_json.access_token" }, +# ] + + +#// 5 +#// +#// Log in to account d +POST /account/login +{ + "email": "d@mail.com", + "password": "$[[env.D_PASSWORD]]" +} +# assert: (200, {status: "ok"}), +# +# register: [ +# { d_token: "_ctx.response.body_json.access_token" }, +# ] + + +#//---------------------------------------------------------------------------- +#// +#// Case 1: +#// 1. User [admin] grants user [a] [edit] permission to [widget_a] +#// 2. User [admin] grants user [b] [view] permission to [widget_a] +#// 3. User [admin] grants user [c] [share] permission to [widget_a] +#// 4. Users [a, b, c] have the corresponding permission +#// 5. [widget_a] is invisible to user [d] +#// +#//---------------------------------------------------------------------------- + + +#// 6 +#// +#// User [admin] grants user [a] [edit] permission to [widget_a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.A_ID]]", + "permission": $[[env.EDIT_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# } +# ] +# }) + + +#// 7 +#// +#// User [admin] grants user [b] [view] permission to [widget_a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.B_ID]]", + "permission": $[[env.VIEW_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# } +# ] +# }) + + +#// 8 +#// +#// User [admin] grants user [c] [share] permission to [widget_a] +POST /resources/integration/$[[env.WIDGET_A_ID]]/share +{ + "shares": [ + { + "resource_type": "integration", + "resource_id": "$[[env.WIDGET_A_ID]]", + "principal_type": "user", + "principal_id": "$[[env.C_ID]]", + "permission": $[[env.SHARE_ACCESS]] + } + ], + "revokes": [] +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "created": [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ] +# }) + + +#// 9 +#// +#// Verify that users [a, b, c] have the corresponding permission +POST /resources/shares/_batch_get +[ + { + "resource_id": "$[[env.WIDGET_A_ID]]", + "resource_type": "integration" + } +] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, [ +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.A_ID]]", +# "permission": $[[env.EDIT_ACCESS]] +# }, +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.B_ID]]", +# "permission": $[[env.VIEW_ACCESS]] +# }, +# { +# "resource_id": "$[[env.WIDGET_A_ID]]", +# "principal_id": "$[[env.C_ID]]", +# "permission": $[[env.SHARE_ACCESS]] +# } +# ]) + + +#// 10 +#// +#// User [d] cannot see widget [widget_a] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget_a&t=1763624116683 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 2: +#// 1. User [a] renames [widget_a] [widget_1] +#// 2. User [b, c] can see [widget_1] +#// 3. User [d] cannot see [widget_1] +#// +#//---------------------------------------------------------------------------- + + +#// 11 +#// +#// User [a] renames [widget_a] [widget_1] +PUT /integration/$[[env.WIDGET_A_ID]] +{ + "name": " widget_1", + "enabled": true, + "guest": { + "enabled": false + }, + "appearance": { + "theme": "auto", + "language": "zh-CN" + }, + "cors": { + "enabled": true, + "allowed_origins": [ + "*" + ] + }, + "searchbox_mode": "embedded", + "hotkey": "ctrl+/", + "enabled_module": { + "search": { + "enabled": true, + "datasource": [ + "*" + ], + "placeholder": "Search whatever you want..." + }, + "ai_chat": { + "enabled": true, + "placeholder": "Ask whatever you want...", + "assistants": [ + "d4cnic28sig62phqk9o0" + ], + "start_page_config": { + "enabled": false, + "logo": { + "light": "", + "dark": "" + } + } + }, + "features": [ + "search_active", + "think_active" + ] + }, + "start_page": { + "enabled": false + }, + "options": { + "embedded_placeholder": "Search..." + }, + "type": "embedded" +} +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.WIDGET_A_ID]]","result":"updated"}) + + +#// 12 +#// +#// User [b] can see [widget_1] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget_1&t=1763624116684 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": " widget_1" } +# ] +# }) + + +#// 13 +#// +#// User [c] can see [widget_1] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget_1&t=1763624116685 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 1, +# "hits.hits": [ +# { "_source.name": " widget_1" } +# ] +# }) + + +#// 14 +#// +#// User [d] cannot see [widget_1] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget_1&t=1763624116686 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#//---------------------------------------------------------------------------- +#// +#// Case 3: +#// 1. User [admin] deletes [widget_1] +#// 2. [widget_1] is invisible to users [a, b, c, d] +#// +#//---------------------------------------------------------------------------- + + +#// 15 +#// +#// User [admin] deletes [widget_1] +DELETE /integration/$[[env.WIDGET_A_ID]] +# request: { +# headers: [ +# {Authorization: "Bearer $[[admin_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, {"_id":"$[[env.WIDGET_A_ID]]","result":"deleted"}) + + +#// 16 +#// +#// User [a] cannot see [widget_1] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget_1&t=1763624116687 +# request: { +# headers: [ +# {Authorization: "Bearer $[[a_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 17 +#// +#// User [b] cannot see [widget_1] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget_1&t=1763624116688 +# request: { +# headers: [ +# {Authorization: "Bearer $[[b_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 18 +#// +#// User [c] cannot see [widget_1] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget_1&t=1763624116689 +# request: { +# headers: [ +# {Authorization: "Bearer $[[c_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) + + +#// 19 +#// +#// User [d] cannot see [widget_1] +GET /integration/_search?filter=type:any(embedded%2Cfloating%2Call%2Cpage%2Cmodal)&from=0&size=100&query=widget_1&t=1763624116690 +# request: { +# headers: [ +# {Authorization: "Bearer $[[d_token]]"}, +# ], +# disable_header_names_normalizing: true, +# }, +# +# assert: (200, { +# "hits.total.value": 0 +# }) diff --git a/tests/widget/test.sh b/tests/widget/test.sh new file mode 100644 index 00000000..ca9b81da --- /dev/null +++ b/tests/widget/test.sh @@ -0,0 +1 @@ +loadgen -config ../loadgen.yml -run scenario3.dsl -debug