Skip to content

Commit

Permalink
Merge pull request #8586 from madhavajay/madhava/signup_test_fix
Browse files Browse the repository at this point in the history
Changed ENABLE_SIGNUP in tox task to False to prevent 07 notebook error
  • Loading branch information
yashgorana authored Mar 18, 2024
2 parents a480fd8 + 3e9a6ba commit 64d2ba3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 deletions.
49 changes: 31 additions & 18 deletions notebooks/api/0.8/07-domain-register-control-flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@
"id": "8",
"metadata": {},
"outputs": [],
"source": [
"# The assumed state of this test is a node with signup set to False\n",
"# however if the tox task has set it to True you need to overwrite the setting\n",
"# before running the tests\n",
"# root_client.settings.allow_guest_signup(enable=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9",
"metadata": {},
"outputs": [],
"source": [
"# Register a new user using root credentials\n",
"response_1 = root_client.register(\n",
Expand All @@ -100,7 +113,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9",
"id": "10",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -117,7 +130,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "10",
"id": "11",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -134,7 +147,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "11",
"id": "12",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -146,7 +159,7 @@
},
{
"cell_type": "markdown",
"id": "12",
"id": "13",
"metadata": {},
"source": [
"#### Now, if root user enable registration, then the guest clients can also register"
Expand All @@ -155,7 +168,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "13",
"id": "14",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -166,7 +179,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "14",
"id": "15",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -177,7 +190,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "15",
"id": "16",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -188,7 +201,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "16",
"id": "17",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -205,7 +218,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "17",
"id": "18",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -222,7 +235,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "18",
"id": "19",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -234,7 +247,7 @@
},
{
"cell_type": "markdown",
"id": "19",
"id": "20",
"metadata": {},
"source": [
"### Toggle signup again"
Expand All @@ -243,7 +256,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "20",
"id": "21",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -254,7 +267,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "21",
"id": "22",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -265,7 +278,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "22",
"id": "23",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -282,7 +295,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "23",
"id": "24",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -299,7 +312,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "24",
"id": "25",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -312,7 +325,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "25",
"id": "26",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -325,7 +338,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "26",
"id": "27",
"metadata": {},
"outputs": [],
"source": []
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,9 @@ setenv =
ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:python}
DEV_MODE = {env:DEV_MODE:True}
TEST_NOTEBOOK_PATHS = {env:TEST_NOTEBOOK_PATHS:api/0.8,tutorials}
ENABLE_SIGNUP=True
ENABLE_SIGNUP={env:ENABLE_SIGNUP:False}
commands =
bash -c "echo Running with ORCHESTRA_DEPLOYMENT_TYPE=$ORCHESTRA_DEPLOYMENT_TYPE DEV_MODE=$DEV_MODE TEST_NOTEBOOK_PATHS=$TEST_NOTEBOOK_PATHS; date"
bash -c "echo Running with ORCHESTRA_DEPLOYMENT_TYPE=$ORCHESTRA_DEPLOYMENT_TYPE DEV_MODE=$DEV_MODE TEST_NOTEBOOK_PATHS=$TEST_NOTEBOOK_PATHS; ENABLE_SIGNUP=$ENABLE_SIGNUP; date"
bash -c "for subfolder in $(echo ${TEST_NOTEBOOK_PATHS} | tr ',' ' '); do \
if [[ $subfolder == *tutorials* ]]; then \
pytest --nbmake "$subfolder" -p no:randomly --ignore=tutorials/model-training -n $(python -c 'import multiprocessing; print(multiprocessing.cpu_count())') -vvvv && \
Expand Down

0 comments on commit 64d2ba3

Please sign in to comment.