swagger-api / swagger-api/swagger-codegen-generators

Test failure when run from path containing characters that should be URL encoded

Open
#943 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
299
Forks
439
PR merge metrics
No merged PRs in 30d

Description

I've cloned repository to /home/pavel/Документы/src/swagger-codegen-generators. When tried to run tests with mvn test I've got the following error:

[ERROR] Tests run: 222, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 8.341 s <<< FAILURE! - in TestSuite
[ERROR] setUp(io.swagger.codegen.v3.generators.examples.ExampleGeneratorTest)  Time elapsed: 0.021 s  <<< FAILURE!
java.io.FileNotFoundException: File '/home/pavel/%D0%94%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B/src/swagger-codegen-generators/target/test-classes/3_0_0/petstore.yaml' does not exist
	at io.swagger.codegen.v3.generators.examples.ExampleGeneratorTest.setUp(ExampleGeneratorTest.java:23)

When moved repository to /home/pavel/swagger-codegen-generators all tests were passed succesfully.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run mvn test with the repository located in a path containing non-ASCII characters and begin at ExampleGeneratorTest.java:23, where setup reports the missing file. Trace how the test resource path is formed and verify that the test suite passes from the encoded path as well as from a simple path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.