Skip to content

Commit

Permalink
Ensure default value aligns with the API
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Oct 9, 2024
1 parent ff3688d commit 94bd92b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/event_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
description:
- Enable the event stream to forward events to the rulebook activation where it is configured.
type: bool
default: true
default: false
version_added: 2.1.0
state:
description:
Expand Down Expand Up @@ -159,7 +159,7 @@ def main() -> None:
organization_name=dict(type="str", aliases=["organization"]),
event_stream_type=dict(type="str", aliases=["type"]),
headers=dict(type="str", default=""),
forward_events=dict(type="bool", default=True),
forward_events=dict(type="bool", default=False),
state=dict(choices=["present", "absent"], default="present"),
)

Expand Down
18 changes: 9 additions & 9 deletions tests/integration/targets/event_stream/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
credential_name: "{{ credential_name }}"
organization_name: Default
forward_events: false
event_stream_type: Basic Event Stream
event_stream_type: "basic"
check_mode: true
register: _result

Expand All @@ -62,7 +62,7 @@
name: "{{ event_stream_name }}"
credential_name: "{{ credential_name }}"
organization_name: Default
event_stream_type: Basic Event Stream
event_stream_type: "basic"
register: _result

- name: Check event stream is created
Expand All @@ -76,7 +76,7 @@
name: "{{ event_stream_name }}"
credential_name: "{{ credential_name }}"
organization_name: Default
event_stream_type: Basic Event Stream
event_stream_type: "basic"
register: _result

# [WARNING]: The field eda_credential_id of unknown 2 has encrypted data and may
Expand All @@ -98,7 +98,7 @@
name: "{{ new_event_stream_name }}"
credential_name: "{{ credential_name }}"
organization_name: Default
event_stream_type: "Basic Event Stream"
event_stream_type: "basic"
register: _result

- name: Check event stream update
Expand All @@ -112,7 +112,7 @@
name: "{{ new_event_stream_name }}"
credential_name: "{{ credential_name }}"
organization_name: Default
event_stream_type: "Basic Event Stream"
event_stream_type: "basic"
register: _result

# [WARNING]: The field eda_credential_id of unknown 5 has encrypted data and may
Expand All @@ -139,9 +139,9 @@
name: "{{ new_event_stream_name }}"
credential_name: "{{ credential_name }}"
organization_name: Default
event_stream_type: "Basic Event Stream"
event_stream_type: "basic"
headers: "Authorization,Custom-Header"
forward_events: false
forward_events: true
register: _result

- name: Check event stream is updated
Expand All @@ -154,12 +154,12 @@
name: "{{ new_event_stream_name }}"
register: _result

- name: Check if event stream headers and forward_events are updated
- name: Check if event stream headers and test_mode are updated
assert:
that:
- _result.event_streams[0].name == new_event_stream_name
- _result.event_streams[0].additional_data_headers == "Authorization,Custom-Header"
- _result.event_streams[0].forward_events == True
- _result.event_streams[0].test_mode == False

- name: List all event stream
ansible.eda.event_stream_info:
Expand Down

0 comments on commit 94bd92b

Please sign in to comment.