Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Jan 17, 2025
1 parent 36ea3dc commit fc87393
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions openapi/roll/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,32 @@ func NewSuite(dirname string) (*Suite, error) {
fset: fset,
ServiceToPackage: map[string]string{},
}
err := filepath.WalkDir(dirname, func(path string, info os.DirEntry, err error) error {
if err != nil {
return err
}
if info.IsDir() {
return nil
entries, err := os.ReadDir(dirname)
if err != nil {
return nil, err
}
for _, entry := range entries {
if entry.IsDir() {
continue
}
path := filepath.Join(dirname, entry.Name())
if strings.HasSuffix(path, "acceptance_test.go") {
// not transpilable
return nil
continue
}
if strings.HasSuffix(path, "files_test.go") {
// not transpilable
return nil
continue
}
if strings.HasSuffix(path, "workspaceconf_test.go") {
// not transpilable
return nil
continue
}
file, err := parser.ParseFile(fset, path, nil, parser.ParseComments)
if err != nil {
return err
return nil, err
}
s.expectExamples(file)
return nil
})
if err != nil {
return nil, err
}
err = s.parsePackages(dirname+"/../workspace_client.go", "WorkspaceClient")
if err != nil {
Expand Down

0 comments on commit fc87393

Please sign in to comment.