Skip to content

Commit 34d145e

Browse files
Fix e2e tests (#577)
1 parent fd34597 commit 34d145e

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

test/caos-ansible-roles/super-agent-config/vars/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# config path
33
super_agent_config_path_linux: "/etc/newrelic-super-agent/config.yaml"
4-
infra_agent_type_version: "0.0.1"
4+
infra_agent_type_version: "0.1.0"
55
otel_agent_type_version: "0.1.0"
66
empty_agents: false
77
opamp_endpoint: https://opamp.staging-service.newrelic.com/v1/opamp

test/e2e/ansible/agents_registration_unregistration.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,13 @@
5454
pause:
5555
seconds: 60
5656

57-
- name: Assert agents are unhealthy
57+
- name: Assert SubAgents are not running
5858
include_role:
59-
name: fleet_api_request
59+
name: caos.ansible_roles.assert_process_running
6060
vars:
61-
assert_agents_health:
62-
ulids: [ "{{ infra_agent_ulid }}", "{{ otel_agent_ulid }}" ]
63-
host: "{{ hostname }}"
64-
healthy: false
61+
processes_not_running:
62+
- "^/usr/bin/newrelic-infra"
63+
- "^/usr/bin/nr-otel-collector"
6564

6665
- name: Assert super-agent is healthy
6766
include_role:

test/e2e/ansible/sub_agent_invalid_remote_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
that: not result.stat.exists
9797

9898
- name: get latest logs from the Super Agent
99-
shell: journalctl -u newrelic-super-agent --since "1min ago" | grep "error processing valid remote config"
99+
shell: journalctl -u newrelic-super-agent --since "1min ago" | grep "error processing remote config"
100100
register: journalctl_log
101101

102102
- name: assert the incorrect config was logged

test/e2e/ansible/super_agent_valid_remote_config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@
267267
retries: 5
268268
delay: 5
269269

270+
- name: Wait for 10 seconds for all agents to be running
271+
pause:
272+
seconds: 10
273+
270274
- name: Assert Super Agent and Agents are running back from local config
271275
include_role:
272276
name: caos.ansible_roles.assert_process_running

0 commit comments

Comments
 (0)