Update it workflow to run tests for PR version of the repo

Before it was running the tests for the latest commit on the main repo instead
of running them for the PR version of it.
This commit is contained in:
ionutboangiu
2023-08-04 12:42:16 -04:00
committed by Dan Christian Bogos
parent db5c6cc4b9
commit 5bea63841b
4 changed files with 5 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ jobs:
- name: Run Ansible Playbook
run: |
ansible-playbook data/ansible/integration_tests/main.yaml -i localhost, -c local -e "ansible_user=$(whoami)"
ansible-playbook data/ansible/integration_tests/main.yaml -i localhost, -c local -e "ansible_user=$(whoami) cgrates_dir=$GITHUB_WORKSPACE clone_repository=false"
- name: Run integration tests
run: |

View File

@@ -13,7 +13,7 @@
mode: "u=rwx,go=rx"
owner: "{{ ansible_user }}"
dest: "{{ cgrates_dir }}"
when: clone_repository
when: "clone_repository|bool"
- name: Git clone cgrates
ansible.builtin.git:
@@ -22,7 +22,7 @@
update: yes
force: yes
version: "{{ git_version }}"
when: clone_repository
when: "clone_repository|bool"
- name: Build cgrates
ansible.builtin.command:

View File

@@ -54,4 +54,4 @@
src: "{{ nats_install_dir }}/nats-server-v{{ nats_version }}-linux-amd64/nats-server"
dest: /usr/local/bin/nats-server
state: link
when: add_nats_to_path
when: "add_nats_to_path|bool"

View File

@@ -230,7 +230,7 @@ func testDspITMigrateAndMove(t *testing.T) {
}
_, err = dspMigrator.dmIN.DataManager().GetDispatcherProfile("cgrates.org",
"Dsp1", false, false, utils.NonTransactional)
if err == nil || err.Error() != utils.ErrNotFound.Error() {
if err == nil || err.Error() != utils.ErrDSPProfileNotFound.Error() {
t.Errorf("expected: %v,\nreceived: %v", utils.ErrDSPProfileNotFound, err)
}