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

test: 3.0.0 initial tests #540

Merged
merged 114 commits into from
Sep 13, 2024
Merged

Conversation

Pakisan
Copy link
Member

@Pakisan Pakisan commented May 22, 2024

Changes:

  • Vitest instead of Mocha - because I want work correctly with relative paths, and don't be afraid to move tests
  • schemas base tests
  • bindings tests
  • common structure for tests - single entry point. Tests only provide test data, to work with

All ignored tests, with reasons are described here - #546

closes #539

@Pakisan Pakisan changed the title test 3.0.0 definitions test: 3.0.0 definitions May 22, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
19.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@Pakisan
Copy link
Member Author

Pakisan commented Jul 26, 2024

@fmvilas @derberg @dalelane @smoya @char0n @GreenRover @jonaslagoni

Check out new tests

tldr;

  • 95 test files for definitions and bindings instead of 400+, previously in this MR
  • common tests structure - empty, extended, wrongly extended, only required, without required, examples

@dalelane
Copy link
Collaborator

There is a lot here, so I'll likely have more comments once I've had a proper look through.

My initial reaction is mostly to the use of spaces in the file names for the new files - I realise this is very much a personal style/preference thing, so I'm sure it works fine as-is, but I would've preferred these to be hyphenated (such as the files in https://github.com/asyncapi/spec-json-schemas/tree/master/migrations and https://github.com/asyncapi/spec-json-schemas/tree/master/scripts ) or camel-cased (such as the files in https://github.com/asyncapi/spec-json-schemas/tree/master/definitions/3.0.0 )

I'll have a proper look and try and add some more substantive comments later

@aeworxet
Copy link

/ptal

@asyncapi-bot
Copy link
Contributor

@char0n @fmvilas @GreenRover @smoya @dalelane @derberg Please take a look at this PR. Thanks! 👋

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

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

Just a word of advice, nobody likes reviewing a 95 file change PR, and some maintainers might even force you to split it up. Also if the new testing setup is unfavored by majority maintainers you could end up having to rewrite it... So small PRs are always preferred!

Other then that, this looks goot to me 👍

However CI does not like it: https://github.com/asyncapi/spec-json-schemas/actions/runs/10109288041/job/27956881619?pr=540

@GreenRover
Copy link
Collaborator

I am out with review. This is to much to understand what is the target and how things belong to each other.
A review would take multiple hours.

@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty program related label label Aug 21, 2024
Copy link

sonarqubecloud bot commented Sep 2, 2024

@Pakisan
Copy link
Member Author

Pakisan commented Sep 2, 2024

folks, sorry for delay

I understand, that review 95 files may look too much, but it's ordinary tests with basic structure

It's not feature implementation, but only tests, don't be afraid 😅

Proposal of this PR is enable basic tests, and tune them on a go

Right now, several tests, were disabled until schema fixes

All ignored tests, with reasons are described here - #546

🚀 : @char0n @fmvilas @smoya @dalelane @derberg @jonaslagoni

@aeworxet
Copy link

/ptal

it's ordinary tests with basic structure

@asyncapi-bot
Copy link
Contributor

@char0n @fmvilas @GreenRover @smoya @dalelane @derberg Please take a look at this PR. Thanks! 👋

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

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

Think we waited long enough, thanks for the patience @Pakisan, but as others mentioned, it is indeed a huge PR. But as this is tests and there are no explicit objections, they do not have any effect on the library itself, let's move this forward 🙂 If there are delayed objections we can always revert parts of it.

My initial reaction is mostly to the use of spaces in the file names for the new files - I realise this is very much a personal style/preference thing, so I'm sure it works fine as-is, but I would've preferred these to be hyphenated (such as the files in https://github.com/asyncapi/spec-json-schemas/tree/master/migrations and https://github.com/asyncapi/spec-json-schemas/tree/master/scripts ) or camel-cased (such as the files in https://github.com/asyncapi/spec-json-schemas/tree/master/definitions/3.0.0 )

Regarding the comment from @dalelane I concur, please make an issue after this is merged so we can rectify this, I have a script that can easily do it🙂

@jonaslagoni jonaslagoni merged commit 93a58d5 into asyncapi:master Sep 13, 2024
12 checks passed
@jonaslagoni
Copy link
Member

@Pakisan is there any other followup issues that are needed 🙂?

@Pakisan
Copy link
Member Author

Pakisan commented Sep 13, 2024

@jonaslagoni

Next steps:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty AsyncAPI Bounty program related label
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3.0.0 initial tests
9 participants