diff --git a/tests/tests/bitbucket/skip-deployment.yaml b/tests/tests/bitbucket/skip-deployment.yaml index b6fa473438..6bacc4ca70 100644 --- a/tests/tests/bitbucket/skip-deployment.yaml +++ b/tests/tests/bitbucket/skip-deployment.yaml @@ -58,3 +58,20 @@ expected_branch: "{{ branch }}" project: "{{ project }}" url: "{{ check_url }}" + +- name: "{{ testname }} - webhook bitbucket delete push" + hosts: localhost + serial: 1 + vars: + git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + tasks: + - include: ../../tasks/webhook-bitbucket/push-delete.yaml + +- name: "{{ testname }} - check if site for project does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" + expected_returncode: 503 + tasks: + - include: ../../checks/check-url-returncode.yaml \ No newline at end of file diff --git a/tests/tests/drupal/drush.yaml b/tests/tests/drupal/drush.yaml index 11549f23d9..ad4fc899b6 100644 --- a/tests/tests/drupal/drush.yaml +++ b/tests/tests/drupal/drush.yaml @@ -147,6 +147,51 @@ tasks: - include: ../../tasks/ssh/ssh-command.yaml +- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, nginx route" + hosts: localhost + serial: 1 + vars: + url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" + expected_content: "CHANGED-{{ random_number }}" + tasks: + - include: ../../checks/check-url-content.yaml + +- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" + hosts: localhost + serial: 1 + vars: + project: "{{ project }}" + branch: "drush-first" + tasks: + - include: ../../tasks/api/remove.yaml + +- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" + hosts: localhost + serial: 1 + vars: + project: "{{ project }}" + branch: "drush-second" + tasks: + - include: ../../tasks/api/remove.yaml + +- name: "{{ testname }} - check if site for {{ project }} does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" + expected_returncode: 503 + tasks: + - include: ../../checks/check-url-returncode.yaml + +- name: "{{ testname }} - check if site for {{ project }} does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" + expected_returncode: 503 + tasks: + - include: ../../checks/check-url-returncode.yaml + - name: "{{ testname }} third - init git, add files, commit, git push" hosts: localhost serial: 1 @@ -186,30 +231,12 @@ tasks: - include: ../../tasks/ssh/ssh-command.yaml -- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, nginx route" - hosts: localhost - serial: 1 - vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" - expected_content: "CHANGED-{{ random_number }}" - tasks: - - include: ../../checks/check-url-content.yaml - -- name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" - hosts: localhost - serial: 1 - vars: - project: "{{ project }}" - branch: "drush-first" - tasks: - - include: ../../tasks/api/remove.yaml - - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost serial: 1 vars: project: "{{ project }}" - branch: "drush-second" + branch: "foo/bar" tasks: - include: ../../tasks/api/remove.yaml @@ -217,16 +244,7 @@ hosts: localhost serial: 1 vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" + url: "http://nginx.{{ project | regex_replace('_', '-') }}.foo-bar.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" expected_returncode: 503 tasks: - - include: ../../checks/check-url-returncode.yaml - -- name: "{{ testname }} - check if site for {{ project }} does not exist anymore" - hosts: localhost - serial: 1 - vars: - url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" - expected_returncode: 503 - tasks: - - include: ../../checks/check-url-returncode.yaml + - include: ../../checks/check-url-returncode.yaml \ No newline at end of file diff --git a/tests/tests/github/skip-deployment.yaml b/tests/tests/github/skip-deployment.yaml index c281db0fcd..e03fb73ac4 100644 --- a/tests/tests/github/skip-deployment.yaml +++ b/tests/tests/github/skip-deployment.yaml @@ -58,3 +58,20 @@ expected_branch: "{{ branch }}" project: "{{ project }}" url: "{{ check_url }}" + +- name: "{{ testname }} - webhook github delete push" + hosts: localhost + serial: 1 + vars: + git_repo_ssh_url: "{{ lookup('env','WEBHOOK_REPO_PREFIX') }}{{ git_repo_name }}" + tasks: + - include: ../../tasks/webhook-github/push-delete.yaml + +- name: "{{ testname }} - check if site for project does not exist anymore" + hosts: localhost + serial: 1 + vars: + url: "http://{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','OPENSHIFT_ROUTE_SUFFIX') }}" + expected_returncode: 503 + tasks: + - include: ../../checks/check-url-returncode.yaml