Skip to content
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

Suite name get rid of spaces #56

Open
eroussy opened this issue Apr 7, 2023 · 1 comment
Open

Suite name get rid of spaces #56

eroussy opened this issue Apr 7, 2023 · 1 comment

Comments

@eroussy
Copy link
Contributor

eroussy commented Apr 7, 2023

When logging a new suite which name contains spaces, the spaces are removed by cukinia.

cukinia.conf

logging suite "suite with spaces"
cukinia_user www-data

When running this command :
$ cukinia -f junitxml -o res.xml cukinia.conf
The output is
res.xml

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="suitewithspaces" package="suitewithspaces" errors="0" tests="1" failures="0" timestamp="2023-04-07T13:56:05" time="0">
    <testcase classname="cukinia" name="Checking user &quot;www-data&quot; exists" time="0">
    </testcase>
  </testsuite>
</testsuites>

And the spaces are gone ("suitewithspaces")

It should not be a problem to keep them because they are enclosed with quotes.

@eroussy eroussy linked a pull request Jun 27, 2023 that will close this issue
@eroussy
Copy link
Contributor Author

eroussy commented Jun 27, 2023

After investigating, the spaces are intentionally removed by a sed command in the _junitxml_add_suite.
If I allow the space character in this sed command, I get a problem : the name of the suite is used to create a temporary file for cukinia. If this name contains spaces, the file is not correctly created.

I found two solutions for this problem :

  • replace all spaces character with underscores (it will be human readable and will not cause the file problem)
  • correct the shell syntax of cukinia to accept spaces in temporary file names.

If it isn't a problem to have spaces in file names, I propose the implementation in PR #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant