# RESTBase test config, used in integration tests. # Load some project templates. These are referenced / shared between domains # in the root_spec further down. default_project: &default_project x-modules: - path: test/test_module.yaml - path: projects/wmf_default.yaml options: &default_options table: backend: sqlite hosts: [localhost] keyspace: system username: cassandra password: cassandra defaultConsistency: one # or 'localQuorum' for production storage_groups: - name: test.group.local domains: /./ dbname: test.db.sqlite3 # ignored in cassandra, but useful in SQLite testing parsoid: host: https://parsoid-beta.wmflabs.org grace_ttl: 2 action: apiUriTemplate: "{{'https://{domain}/w/api.php'}}" baseUriTemplate: "{{'https://{domain}/api/rest_v1'}}" graphoid: host: https://graphoid-beta.wmflabs.org mathoid: host: https://mathoid-beta.wmflabs.org # 10 days Varnish caching, one day client-side cache-control: s-maxage=864000, max-age=86400 mobileapps: host: https://appservice.wmflabs.org summary: protocol: https implementation: mcs host: https://appservice.wmflabs.org citoid: host: https://citoid-beta.wmflabs.org recommendation: host: https://recommendation-api-beta.wmflabs.org events: {} purged_cache_control: test_purged_cache_control # Cache control for purged endpoints allowing short-term client caching purged_cache_control_client_cache: test_purged_cache_control_with_client_caching pdf: # Cache PDF for 5 minutes since it's not purged cache_control: s-maxage=600, max-age=600 uri: https://pdfrender-beta.wmflabs.org secret: secret transform: cx_host: https://cxserver-beta.wmflabs.org skip_updates: false # A separate project for en.wikipedia because it is more feature-rich en.wikipedia.org: &en.wikipedia.org x-modules: - path: test/test_module.yaml options: events: uri: http://127.0.0.1:8085/v1/events topic: resource_change transcludes_topic: change-prop.transcludes.resource-change - path: projects/wmf_enwiki.yaml options: *default_options labs_project: &labs_project x-modules: - path: test/test_module.yaml - path: projects/wmf_enwiki.yaml options: *default_options # A different project template, sharing configuration options. wikimedia.org: &wikimedia.org x-modules: - path: test/test_module.yaml - path: projects/wikimedia.org.yaml options: <<: *default_options pageviews: host: https://wikimedia.org/api/rest_v1/metrics wiktionary_project: &wiktionary_project x-modules: - path: projects/wmf_wiktionary.yaml options: *default_options # Hacky way to parametrize RESTBase tests. TODO: Move to config? test: content_types: html: '/^text\/html; charset=utf-8; profile="https:\/\/www\.mediawiki\.org\/wiki\/Specs\/HTML\/[\d.]+"$/' data-parsoid: '/^application\/json; charset=utf-8; profile="https:\/\/www\.mediawiki\.org\/wiki\/Specs\/data-parsoid/[\d.]+"$/' wikitext: '/^text\/plain; charset=utf-8; profile="https:\/\/www.mediawiki.org\/wiki\/Specs\/wikitext\/[\d.]+"$/' # The root of the spec tree. Domains tend to share specs by referencing them # using YAML references. spec_root: &spec_root title: "The RESTBase root" # Some more general RESTBase info x-request-filters: - path: test/utils/uri_dump_filter.js options: dump_test_uris: false filepath: uri_dump - path: lib/security_response_header_filter.js x-sub-request-filters: - type: default name: http options: allow: - pattern: /^https?:\/\/[a-zA-Z0-9\.]+\/w\/api\.php/ forward_headers: true - pattern: /^https?:\/\/parsoid-beta.wmflabs.org.+/ forward_headers: true - pattern: /^https?:\/\// paths: /{domain:test.wikipedia.org}: *default_project # The order is important for tests. # Redirect tests require en.wiki being not the first wiki in the list. /{domain:en.wikipedia.org}: *en.wikipedia.org /{domain:ru.wikipedia.org}: *default_project /{domain:de.wikipedia.org}: *default_project /{domain:test2.wikipedia.org}: *default_project /{domain:commons.wikimedia.org}: *default_project # labs, used for most tests /{domain:en.wikipedia.beta.wmflabs.org}: *labs_project # For security testing we rely on mocks, so it's OK to use French wiki. /{domain:fr.wikipedia.org}: <<: *default_project x-route-filters: - path: ./lib/mediawiki_auth_filter.js options: permissions: - read # global domain /{domain:wikimedia.org}: *wikimedia.org # Wiktionary has some specific endpoints /{domain:en.wiktionary.org}: *wiktionary_project # Finally, a standard service-runner config. info: name: restbase services: - name: restbase module: hyperswitch conf: port: 7231 spec: *spec_root salt: secret default_page_size: 1 user_agent: RESTBase-testsuite ui_name: RESTBase ui_url: https://www.mediawiki.org/wiki/RESTBase ui_title: RESTBase docs logging: name: restbase level: info #streams: #- type: gelf # host: <%= @logstash_host %> # port: <%= @logstash_port %> metrics: #type: txstatsd #host: localhost #port: 8125 #batch: true