From 5bea63841b5f0865a6dc125e6f9bbbee3ec1ed99 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Fri, 4 Aug 2023 12:42:16 -0400 Subject: [PATCH] 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. --- .github/workflows/integration_tests.yaml | 2 +- data/ansible/roles/install_cgrates/tasks/main.yaml | 4 ++-- data/ansible/roles/nats/tasks/main.yaml | 2 +- migrator/dispatchers_it_test.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_tests.yaml b/.github/workflows/integration_tests.yaml index 1161f0204..0bf29ad36 100644 --- a/.github/workflows/integration_tests.yaml +++ b/.github/workflows/integration_tests.yaml @@ -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: | diff --git a/data/ansible/roles/install_cgrates/tasks/main.yaml b/data/ansible/roles/install_cgrates/tasks/main.yaml index bd680f30a..130f0bcd2 100644 --- a/data/ansible/roles/install_cgrates/tasks/main.yaml +++ b/data/ansible/roles/install_cgrates/tasks/main.yaml @@ -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: diff --git a/data/ansible/roles/nats/tasks/main.yaml b/data/ansible/roles/nats/tasks/main.yaml index 528849f0f..e06770ba5 100644 --- a/data/ansible/roles/nats/tasks/main.yaml +++ b/data/ansible/roles/nats/tasks/main.yaml @@ -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" diff --git a/migrator/dispatchers_it_test.go b/migrator/dispatchers_it_test.go index d43e402c2..34d0a901d 100644 --- a/migrator/dispatchers_it_test.go +++ b/migrator/dispatchers_it_test.go @@ -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) }