Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for types other than integers #2436

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

ptodev
Copy link
Collaborator

@ptodev ptodev commented Jan 17, 2025

No description provided.

@ptodev ptodev requested a review from wildum January 17, 2025 09:17
@ptodev ptodev requested a review from a team as a code owner January 17, 2025 09:17
Copy link
Contributor

@wildum wildum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one, good catch on the float and the tests names, this will make the feature much more robust

InputFloat *float64 `alloy:"input_float,attr,optional"`
InputBool *bool `alloy:"input_bool,attr,optional"`
InputMap *map[string]any `alloy:"input_map,attr,optional"`
InputArray *[]any `alloy:"input_array,attr,optional"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it not work to just have one attribute "any"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would, but I like this approach since it's more clear what we want to test.

internal/runtime/internal/testcomponents/logger.go Outdated Show resolved Hide resolved
internal/runtime/internal/testcomponents/logger.go Outdated Show resolved Hide resolved
internal/runtime/internal/testcomponents/logger.go Outdated Show resolved Hide resolved
@ptodev ptodev requested a review from wildum January 20, 2025 17:52
@ptodev ptodev merged commit 5b54df3 into ptodev/dynamic-pipelines Jan 23, 2025
12 of 15 checks passed
@ptodev ptodev deleted the ptodev/dynamic-pipelines-docs-tests branch January 23, 2025 10:48
ptodev added a commit that referenced this pull request Jan 27, 2025
* Add tests for types other than integers

* Minor fixes to string_receiver

* Add a foreach test for maps which contain maps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants