eschutho commented on a change in pull request #11207:
URL: 
https://github.com/apache/incubator-superset/pull/11207#discussion_r508710602



##########
File path: docker/docker-init.sh
##########
@@ -59,3 +60,38 @@ if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
     superset load_examples
     echo_step "4" "Complete" "Loading examples"
 fi
+}
+
+with_cypress(){
+    # Configure environment
+    echo_step "1" "Starting" "Configuring environment for Cypress"
+    sed -i '/ENABLE_REACT_CRUD_VIEWS = False/c\ENABLE_REACT_CRUD_VIEWS = True' 
/app/superset/config.py
+    sed -i '/ENABLE_REACT_CRUD_VIEWS = 
os.environ.get("ENABLE_REACT_CRUD_VIEWS", False)/c\ENABLE_REACT_CRUD_VIEWS = 
True' /app/tests/superset_test_config.py
+    export SUPERSET_CONFIG=${SUPERSET_CONFIG}
+    echo_step "1" "Complete" "Configuring environment for Cypress"
+
+    # Initialize the database (drop and recreate tables before)
+    echo_step "2" "Starting" "Applying DB migrations"
+    superset drop_db --yes

Review comment:
       this is a small nit, but can we make the flag `--force` instead? For 
someone who uses this command outside of this scope, `--force` sounds more 
destructive and might make them pause before using it. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to