-
Notifications
You must be signed in to change notification settings - Fork 14
CLOUDP-311375: Update foascli split
command to support upcoming
apis
#673
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,26 @@ func TestSplitPrivatePreviewRun(t *testing.T) { | |
require.Contains(t, info.Spec.Paths.Map(), "/api/atlas/v2/groups") | ||
} | ||
|
||
func TestSplitUpcomingRun(t *testing.T) { | ||
t.Parallel() | ||
fs := afero.NewMemMapFs() | ||
opts := &Opts{ | ||
basePath: "../../../test/data/openapi_with_upcoming.json", | ||
outputPath: "foas.yaml", | ||
fs: fs, | ||
env: "dev", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the-absolute-super-nit: set format to yaml so that you only generate a yaml as "all" is the default and we'll generate an unused file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will update it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry i approved can be in your next PR |
||
} | ||
|
||
require.NoError(t, opts.Run()) | ||
|
||
info, err := loadRunResultOas(fs, "foas-2025-09-22.upcoming.yaml") | ||
require.NoError(t, err) | ||
|
||
// check paths has only one | ||
require.Len(t, info.Spec.Paths.Map(), 1) | ||
require.Contains(t, info.Spec.Paths.Map(), "/api/atlas/v2/openapi/info") | ||
} | ||
|
||
func TestSplitMultiplePreviewsRun(t *testing.T) { | ||
t.Parallel() | ||
fs := afero.NewMemMapFs() | ||
|
Uh oh!
There was an error while loading. Please reload this page.