You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a test using Docker run, the project name in testcases.yaml can include whitespaces, e.g. project_name: Hello world tests
The xTesting suite correctly interprets the whitespaces during the test and in the test report.
However, if the same testcases.yaml is used in xTestingCI where the ansiblle role collivier.xtesting is executed using the following site.yaml:
TASK [collivier.xtesting : Creating jenkins_jobs.ini] *********************************************************************************
changed: [127.0.0.1]
TASK [collivier.xtesting : Creating run.yaml for Hello world tests] *******************************************************************
changed: [127.0.0.1]
TASK [collivier.xtesting : Loading Jenkins jobs] **************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": ["jenkins-jobs", "--conf", "/tmp/jenkins_jobs.ini", "update", "/tmp/Hello", "world", "tests.yaml"], "delta": "0:00:00.773301", "end": "2024-08-08 12:58:53.819591", "msg": "non-zero return code", "rc": 1, "start": "2024-08-08 12:58:53.046290", "stderr": "INFO:jenkins_jobs.cli.subcommand.update:Updating jobs in ['/tmp/Hello'] (['world', 'tests.yaml'])\nTraceback (most recent call last):\n File \"/usr/bin/jenkins-jobs\", line 10, in <module>\n sys.exit(main())\n File \"/usr/lib/python3/dist-packages/jenkins_jobs/cli/entry.py\", line 174, in main\n jjb.execute()\n File \"/usr/lib/python3/dist-packages/jenkins_jobs/cli/entry.py\", line 154, in execute\n ext.obj.execute(self.options, self.jjb_config)\n File \"/usr/lib/python3/dist-packages/jenkins_jobs/cli/subcommand/update.py\", line 134, in execute\n builder, xml_jobs, xml_views = self._generate_xmljobs(options, jjb_config)\n File \"/usr/lib/python3/dist-packages/jenkins_jobs/cli/subcommand/update.py\", line 114, in _generate_xmljobs\n parser.load_files(options.path)\n File \"/usr/lib/python3/dist-packages/jenkins_jobs/parser.py\", line 136, in load_files\n self.parse(in_file)\n File \"/usr/lib/python3/dist-packages/jenkins_jobs/parser.py\", line 176, in parse\n with io.open(fn, \"r\", encoding=\"utf-8\") as fp:\nFileNotFoundError: [Errno 2] No such file or directory: '/tmp/Hello'", "stderr_lines": ["INFO:jenkins_jobs.cli.subcommand.update:Updating jobs in ['/tmp/Hello'] (['world', 'tests.yaml'])", "Traceback (most recent call last):", " File \"/usr/bin/jenkins-jobs\", line 10, in <module>", " sys.exit(main())", " File \"/usr/lib/python3/dist-packages/jenkins_jobs/cli/entry.py\", line 174, in main", " jjb.execute()", " File \"/usr/lib/python3/dist-packages/jenkins_jobs/cli/entry.py\", line 154, in execute", " ext.obj.execute(self.options, self.jjb_config)", " File \"/usr/lib/python3/dist-packages/jenkins_jobs/cli/subcommand/update.py\", line 134, in execute", " builder, xml_jobs, xml_views = self._generate_xmljobs(options, jjb_config)", " File \"/usr/lib/python3/dist-packages/jenkins_jobs/cli/subcommand/update.py\", line 114, in _generate_xmljobs", " parser.load_files(options.path)", " File \"/usr/lib/python3/dist-packages/jenkins_jobs/parser.py\", line 136, in load_files", " self.parse(in_file)", " File \"/usr/lib/python3/dist-packages/jenkins_jobs/parser.py\", line 176, in parse", " with io.open(fn, \"r\", encoding=\"utf-8\") as fp:", "FileNotFoundError: [Errno 2] No such file or directory: '/tmp/Hello'"], "stdout": "", "stdout_lines": []}
The workaround is not using whitespaces in the project name value included in testcases.yaml and site.yml (both values have to be IMO aligned, i.e. be the same). It just would be nicer to use / see whitespaces in the log report. I did not try using quotes or apos.
The text was updated successfully, but these errors were encountered:
When running a test using Docker run, the project name in testcases.yaml can include whitespaces, e.g.
project_name: Hello world tests
The xTesting suite correctly interprets the whitespaces during the test and in the test report.
However, if the same testcases.yaml is used in xTestingCI where the ansiblle role collivier.xtesting is executed using the following site.yaml:
.. then the ansible task fails with:
The workaround is not using whitespaces in the project name value included in testcases.yaml and site.yml (both values have to be IMO aligned, i.e. be the same). It just would be nicer to use / see whitespaces in the log report. I did not try using quotes or apos.
The text was updated successfully, but these errors were encountered: