Skip to content

Conversation

@ZaoralJ
Copy link

@ZaoralJ ZaoralJ commented Feb 29, 2024

About the PR

using raw strings to in unit tests

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you ZaoralJ for your first pull request to AsyncAPI.NET repository. Please check out our contributors guide.

@ZaoralJ ZaoralJ changed the title use raw strings in tests refactor: use raw strings in tests Feb 29, 2024
@ZaoralJ
Copy link
Author

ZaoralJ commented Feb 29, 2024

It seems that test are platform dependant:

image

@VisualBean
Copy link
Contributor

VisualBean commented Feb 29, 2024

It seems that test are platform dependant:

image

We run them both for macos and windows in the pipelines, so it really shouldn't.
We have however seen problems before with the ticks in yaml, not being consistent.

@VisualBean
Copy link
Contributor

VisualBean commented Mar 1, 2024

@ZaoralJ The tests are basically failing due to added whitespace (or forbidden characters) which is probably what we are running into as its inconsistent across platforms.
In SpecialCharacterExtensions there is a method GetYamlCompatibleString which takes care of figuring out when to tick and when not to.

Ill see if I can do something about improving consistency.

@ByronMayne
Copy link
Contributor

ly failing due to added whitespace (or forbidden characters) which is probably what we are running into as its inconsistent across platforms.

The issue is not platforms but with this method. It is missing a a few edge cases as well as tests using different styles for version like strings. Some tests have 2.0.1 where others have '2.0.1'. In my PR I fixed all the unit tests that are failing

@VisualBean
Copy link
Contributor

Hi @ZaoralJ ive done what you did, in a separate PR. Thank you though! a good change

@VisualBean VisualBean closed this Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants