zulip/tools
100RABHpy 21be0ef445 openapi: Refactor hacky openAPI curl test.
Fixes #17795

In PR #17014, we added support for deactivate-own-user.
And while doing so, we first deactivated the client and
then reactivated it. But this implementation is a bit
hacky.

So, to fix this, we're now deactivating a test_user so that
we don't have to reactivate it. We did so by changing the value
of authentication_line.

As we want to keep endpoint code out of the
“test_curl_examples”, we changed the value of
authentication_line in `curl_param_value_generators.py`.

To work this out, we create a new global variable named
AUTHENTICATION_LINE in “curl_param_value_generators.py”
and change its value in function “deactivate_own_user” and
to use this change in “test_curl_examples,” we import
AUTHENTICATION_LINE.

AUTHENTICATION_LINE is of list data type because we want a
pointer to original mutable object so that changes made during
run time show across the module. Another way to do this is to change
the way we import variable, but that will be inconsistent to
the way we had in all other files.

To remove confusion between AUTHENTICATION_LINE and
authentication_line we renamed authentication_line
to default_authentication_line.
2021-04-28 15:49:35 -07:00
..
ci scripts: Add a start-server as well. 2021-04-21 10:24:08 -07:00
documentation_crawler docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
droplets docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
i18n i18n: Tweak makemessages for Django 3.1 parameters. 2021-03-22 19:37:20 -07:00
lib docs: Fix spelling errors caught by codespell. 2021-04-26 09:31:08 -07:00
linter_lib refactor: Split dev related code from `auth.py` into `dev_login.py`. 2021-04-23 15:11:44 -07:00
node_lib js: Elide .js and .ts extensions from imports and requires. 2020-09-01 16:43:02 -07:00
oneclickapps docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
setup tools: Have `optimize-svg` do the optimization automatiically. 2021-04-19 10:16:54 -07:00
test-install shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
tests templates: Mark all void tags as self-closing. 2021-04-21 09:49:34 -07:00
wsl tools: Add script to start database services for WSL. 2020-04-11 12:05:33 -07:00
zulip-export python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
README.md cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
__init__.py
build-docs docs: Replace Makefile based on output of newer sphinx-quickstart. 2019-12-02 18:39:33 -08:00
build-release-tarball docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
cache-zulip-git-version shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
check-capitalization tools: Improve output from check-capitalization. 2021-04-09 11:09:12 -07:00
check-frontend-i18n python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
check-issue-labels python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
check-openapi eslint: Enable lines-around-directive. 2021-02-10 10:27:14 -08:00
check-provision tools: Rename force argument to skip-provision-check 2021-03-03 09:17:49 -08:00
check-schemas check_schema: Ignore operation field in schema validation for openapi. 2021-03-22 23:45:42 -07:00
check-templates templates: Delete unused markdown_help.html. 2021-03-11 21:45:48 -08:00
check-thirdparty python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
clean-branches shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
clean-repo
commit-message-lint docs: Use consistent spelling of CircleCI. 2020-04-28 11:26:58 -07:00
commit-msg shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
conf.ini-template
coveragerc parallel: Remove run_parallel. 2020-09-14 16:22:23 -07:00
create-test-api-docs python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
debug-require-webpack-plugin.ts eslint: Enable @typescript-eslint/consistent-type-imports. 2021-03-18 17:26:19 -07:00
debug-require.js js: Add "use strict" directive to CommonJS files. 2020-07-31 22:09:46 -07:00
deploy-branch shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
diagnose python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
documentation.vnufilter requirements: Upgrade Python requirements. 2020-06-25 13:14:37 -07:00
duplicate_commits.json tools: Move duplicate_commits.json file to tools directory. 2020-04-07 16:06:29 -07:00
fetch-contributor-data python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
fetch-pull-request tools: Use require_clean_work_tree everywhere. 2020-04-06 17:52:10 -07:00
fetch-rebase-pull-request tools: Use require_clean_work_tree everywhere. 2020-04-06 17:52:10 -07:00
find-unused-css styles: Rename .scss files back to .css. 2020-09-15 16:33:28 -07:00
generate-integration-docs-screenshot tools: Fix mypy errors with generate-integration-docs-screenshot. 2021-04-28 08:47:38 -07:00
lint lint: Suppress Ruby warnings from puppet on Ubuntu 20.04. 2021-03-29 12:41:34 -07:00
message-screenshot.js tools: Add support for generating integration screenshots remotely. 2021-04-19 10:44:43 -07:00
pre-commit tools: Rename force argument to skip-provision-check 2021-03-03 09:17:49 -08:00
pretty-print-html python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
provision ci: Remove unused circleci config file and update codebase. 2021-03-16 15:11:21 -07:00
push-to-pull-request push-to-pull-request: Wait for GitHub background update before merge. 2021-02-03 14:55:08 -08:00
rebuild-dev-database terminate-psql-sessions: Rely on the caller to set PGHOST, PGUSER. 2020-06-15 21:37:14 -07:00
rebuild-test-database shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
release-tarball-exclude.txt
renumber-migrations python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
reset-to-pull-request shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
review python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
run-dev.py tools: Update run-dev.py to output right subdomain if on Zulip droplet. 2021-04-16 14:57:36 -07:00
run-mypy tools: Rename force argument to skip-provision-check 2021-03-03 09:17:49 -08:00
run-tsc tsconfig: Move to top level. 2019-11-04 18:12:11 -08:00
run-yarn-deduplicate yarn.lock: Share duplicate packages with yarn-deduplicate. 2019-09-02 19:30:09 -07:00
semgrep.yml python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
setup-git-repo shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
show-profile-results python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
stop-run-dev python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
test-all tools: Remove -f short option for test-all. 2021-03-03 09:17:49 -08:00
test-api openapi: Refactor hacky openAPI curl test. 2021-04-28 15:49:35 -07:00
test-backend ci: Use general terms for CircleCI. 2021-03-16 14:56:43 -07:00
test-documentation shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
test-help-documentation tools: Rename force argument to skip-provision-check 2021-03-03 09:17:49 -08:00
test-js-with-node settings/muted-topic: Move list-create code to designated file. 2021-04-27 17:53:06 -07:00
test-js-with-puppeteer puppeteer_tests: Display the number of tests completed after each run. 2021-04-01 07:47:26 -07:00
test-locked-requirements python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
test-migrations requirements: Upgrade Python requirements. 2021-04-15 21:47:33 -07:00
test-queue-worker-reload python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
test-run-dev python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
test-tools python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
update-locked-requirements requirements: Fix paths to 'non-"lock" files'; those are the .in files 2021-03-04 18:08:45 -08:00
update-prod-static update-prod-static: Remove unused --prev-deploy option. 2021-03-04 18:04:57 -08:00
update-zuliprc-api-field python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
webpack webpack: Introduce `webpack.dev-asset.json`. 2021-04-19 10:31:39 -07:00
webpack.assets.json js: Extract password_quality module; remove zxcvbn from globals. 2021-04-24 13:08:52 -07:00
webpack.dev-assets.json webpack: Introduce `webpack.dev-asset.json`. 2021-04-19 10:31:39 -07:00
zanitizer zanitizer: Reformat with perltidy. 2021-03-24 12:12:04 -07:00
zanitizer_config.pm.sample zanitizer: Reformat with perltidy. 2021-03-24 12:12:04 -07:00

README.md

This directory contains scripts that are used in building, managing, testing, and other forms of work in a Zulip development environment. Note that tools that are also useful in production belong in scripts/ or should be Django management commands.

For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.