diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 00f5fdab9d34c5fd7560ca9060c5eb72d6e9f107..e9c0e0131d11423d2ba6833955cf4cc440d843b0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -40,6 +40,7 @@ deploy_testing:
   environment:
     name: test/$CI_COMMIT_REF_NAME
     url: https://$CI_COMMIT_REF_NAME.test.ucc.asn.au
+    on_stop: stop_testing
   except:
       - master
 
@@ -66,7 +67,7 @@ deploy_staging:
   only:
       - master
 
-stop_test:
+stop_testing:
   stage: deploy
   variables:
     GIT_STRATEGY: none