Skip to content

[Bug] ListTestCase interface exec failed. #459

Description

@yuluo-yx

Description:
The ListTestCase interface throws a 500 exception when a test resource yaml file other than the one created exists in the atest directory.

f6fa0ffe2f1074d7e1565957df2b25d

Repro steps:

  1. git pull repo
  2. go build -o atest main.go
  3. ./atest server
  4. access front page and new create test resource.
  5. then click node.

Note: If there are privacy concerns, sanitize the data prior to

caused by the presence of yaml files other than the test resource file in the atest executable directory.

Activity

  1. added
    legendThe contributions before they become a committer
    on Jun 11, 2024
  2. linuxsuren-fs commented on Oct 9, 2026

    @linuxsuren-fs
    Contributor

    Tried to reproduce this on the latest master and it looks already fixed: fileLoader.ListTestSuite now skips any file that fails to load or parse (with a warning log, see pkg/testing/loader_file.go around L184-L193), and Parse additionally runs JSON-schema validation, so foreign YAML files (e.g. a docker-compose.yaml sitting next to the suites) get rejected and skipped instead of failing the whole listing.

    Verified locally with a scratch test: given one valid suite plus a docker-compose.yaml in the same directory, ListTestSuite returns the single valid suite with err = nil, and the foreign file only produces a failed to parse data log line (name is required, Additional property services is not allowed).

    @yuluo-yx could you re-check with a recent build and close this issue if it no longer reproduces? @LinuxSuRen feel free to close it directly if you consider it fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglegendThe contributions before they become a committer

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions