mongodb / openapi

MongoDB OpenAPI specs
Apache License 2.0
4 stars 3 forks source link

CLOUDP-267019: [e2e test] Add an e2e scenario to test the changelog create [Part 1] #179

Closed andreaangiolillo closed 4 weeks ago

andreaangiolillo commented 4 weeks ago

Proposed changes

Jira ticket: CLOUDP-267019 This PR adds e2e tests to test that the changelog generated by foas is the same one as the ones generated in evergreen when we released a new version.

make e2e-test                                                                                                                            
==> Building foascli binary
go build -ldflags "-s -w -X github.com/mongodb/openapi/tools/cli/internal/version.GitCommit=98fa930c1adacec629a993716c89ea309b7b7717 -X github.com/mongodb/openapi/tools/cli/internal/version.Version=v0.0.1" -o ./bin/foascli ./cmd
==> Running E2E tests...
go test -v -p 1 -parallel 1 -timeout 60m  ./test/e2e...
=== RUN   TestChangelog
=== RUN   TestChangelog/Generate_Changelog_with_new_API_Version
2024/08/20 11:35:01 Checking file: changelog.json
2024/08/20 11:35:01 Checking file: changelog-all.json
2024/08/20 11:35:01 Checking file: 2023-01-01_2023-02-01.json
2024/08/20 11:35:01 Checking file: 2023-01-01_2023-10-01.json
2024/08/20 11:35:01 Checking file: 2023-01-01_2023-11-15.json
2024/08/20 11:35:01 Checking file: 2023-01-01_2024-05-30.json
2024/08/20 11:35:01 Checking file: 2023-01-01_2024-08-05.json
2024/08/20 11:35:01 Checking file: 2023-02-01_2023-10-01.json
2024/08/20 11:35:01 Checking file: 2023-02-01_2023-11-15.json
2024/08/20 11:35:01 Checking file: 2023-02-01_2024-05-30.json
2024/08/20 11:35:01 Checking file: 2023-02-01_2024-08-05.json
2024/08/20 11:35:01 Checking file: 2023-10-01_2023-11-15.json
2024/08/20 11:35:01 Checking file: 2023-10-01_2024-05-30.json
2024/08/20 11:35:01 Checking file: 2023-10-01_2024-08-05.json
2024/08/20 11:35:01 Checking file: 2023-11-15_2024-05-30.json
2024/08/20 11:35:01 Checking file: 2023-11-15_2024-08-05.json
2024/08/20 11:35:01 Checking file: 2024-05-30_2024-08-05.json
--- PASS: TestChangelog (10.67s)
    --- PASS: TestChangelog/Generate_Changelog_with_new_API_Version (10.67s)

Next steps

I am going to add another e2e scenario to test the changelog generation when there is no new API version released