Skip to content

Commit

Permalink
Added tests for cv_submit_workspace_force
Browse files Browse the repository at this point in the history
  • Loading branch information
sugetha24 committed Sep 20, 2024
1 parent 25f504a commit 54d86a5
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
cv_server: www.cv-staging.corp.arista.io
cv_token: "{{ lookup('env', 'CVAAS_AAWG_CI') }}"
cv_verify_certs: false
cv_devices: [avd-ci-leaf1, avd-ci-leaf2, avd-ci-leaf3, avd-ci-leaf4, avd-ci-spine1, avd-ci-spine2 ]
cv_devices: [ avd-ci-leaf1, avd-ci-leaf2, avd-ci-leaf3, avd-ci-leaf4, avd-ci-spine1, avd-ci-spine2, avd-ci-core1 ]
cv_skip_missing_devices: true
eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs"
structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs"
Expand Down
112 changes: 56 additions & 56 deletions ansible_collections/arista/avd/molecule/cv_deploy/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
cv_server: www.cv-staging.corp.arista.io
cv_token: "{{ lookup('env', 'CVAAS_AAWG_CI') }}"
cv_verify_certs: false
cv_devices: [avd-ci-leaf1, avd-ci-leaf2, avd-ci-leaf3, avd-ci-leaf4, avd-ci-spine1, avd-ci-spine2 ]
cv_devices: [ avd-ci-leaf1, avd-ci-leaf2, avd-ci-leaf3, avd-ci-leaf4, avd-ci-spine1, avd-ci-spine2, avd-ci-core1 ]
cv_skip_missing_devices: true
eos_config_dir: "{{ playbook_dir }}/intended/configs/test_configs"
structured_dir: "{{ playbook_dir }}/intended/structured_configs/test_configs"
Expand Down Expand Up @@ -158,61 +158,61 @@
cv_submit_workspace_force: true
cv_run_change_control: true

# - name: Provision with cv_submit_workspace_force = false
# run_once: true
# delegate_to: localhost
# ansible.builtin.import_role:
# name: arista.avd.cv_deploy
# vars:
# # cv_devices: [ avd-ci-leaf1, avd-ci-leaf2, avd-ci-leaf3, avd-ci-leaf4, avd-ci-spine1, avd-ci-spine2, avd-ci-core1 ]
# cv_devices: [ avd-ci-leaf2, avd-ci-core1 ]
# cv_submit_workspace_force: false
# ignore_errors: yes
# register: cvp_errors

# - name: 'Display CVP result'
# run_once: true
# ansible.builtin.debug:
# msg: '{{ cv_deploy_results }}'

# - name: Check CVP returns
# ansible.builtin.assert:
# that:
# # errors and warnings
# - "'Failed to submit workspace' in cv_deploy_results.errors[0]"

# - name: Cleanup
# run_once: true
# delegate_to: localhost
# ansible.builtin.import_role:
# name: arista.avd.cv_deploy
# vars:
# eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs"
# structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs"
# cv_submit_workspace: true
# cv_submit_workspace_force: true
# cv_run_change_control: true

# - name: Provision with cv_submit_workspace_force = true
# run_once: true
# delegate_to: localhost
# ansible.builtin.import_role:
# name: arista.avd.cv_deploy
# vars:
# cv_devices: [ avd-ci-leaf1, avd-ci-leaf2, avd-ci-leaf3, avd-ci-leaf4, avd-ci-spine1, avd-ci-spine2, avd-ci-core1 ]
# # cv_devices: [ avd-ci-core1 ]
# cv_submit_workspace_force: true

# - name: 'Display CVP result'
# run_once: true
# ansible.builtin.debug:
# msg: '{{ cv_deploy_results }}'

# - name: Check CVP returns
# ansible.builtin.assert:
# that:
# # errors and warnings
# - cv_deploy_results.errors == []
- name: Provision with cv_submit_workspace_force = false
run_once: true
delegate_to: localhost
ansible.builtin.import_role:
name: arista.avd.cv_deploy
vars:
# cv_devices: [ avd-ci-leaf1, avd-ci-leaf2, avd-ci-leaf3, avd-ci-leaf4, avd-ci-spine1, avd-ci-spine2, avd-ci-core1 ]
cv_devices: [ avd-ci-leaf2, avd-ci-core1 ]
cv_submit_workspace_force: false
ignore_errors: yes
register: cvp_errors

- name: 'Display CVP result'
run_once: true
ansible.builtin.debug:
msg: '{{ cv_deploy_results }}'

- name: Check CVP returns
ansible.builtin.assert:
that:
# errors and warnings
- "'Failed to submit workspace' in cv_deploy_results.errors[0]"

- name: Cleanup
run_once: true
delegate_to: localhost
ansible.builtin.import_role:
name: arista.avd.cv_deploy
vars:
eos_config_dir: "{{ playbook_dir }}/intended/configs/base_configs"
structured_dir: "{{ playbook_dir }}/intended/structured_configs/base_configs"
cv_submit_workspace: true
cv_submit_workspace_force: true
cv_run_change_control: true

- name: Provision with cv_submit_workspace_force = true
run_once: true
delegate_to: localhost
ansible.builtin.import_role:
name: arista.avd.cv_deploy
vars:
cv_devices: [ avd-ci-leaf1, avd-ci-core1 ]
# cv_devices: [ avd-ci-core1 ]
cv_submit_workspace_force: true

- name: 'Display CVP result'
run_once: true
ansible.builtin.debug:
msg: '{{ cv_deploy_results }}'

- name: Check CVP returns
ansible.builtin.assert:
that:
# errors and warnings
- cv_deploy_results.errors == []

- name: Provision with cv_run_change_control = false
run_once: true
Expand Down

0 comments on commit 54d86a5

Please sign in to comment.