8000 DEV-828: Don't allow execution of empty tests names by ifbyol · Pull Request #4614 · okteto/okteto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DEV-828: Don't allow execution of empty tests names #4614

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

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

ifbyol
Copy link
Member
@ifbyol ifbyol commented Dec 10, 2024

Proposed changes

DEV-828

Don't allow to execute empty test containers names. We were not filtering empty strings as part of the arguments, so when an empty strings comes (for example, from the GitHub action), it is failing with the error Don't know what to do with "".

So, we skip empty strings

This part of the code doesn't have unit tests, and I was changing integration tests, but I realized we are not running them never, so I will need to perform more changes. In order to have this fixed as soon as possible I will send a follow up PR, but I want to include this in the 3.2 release branch

How to validate

Having the following manifest:

test:
  unit:
    commands:
      - name: hi
        command: echo "hi unit!"
  integration:
    commands:
      - name: hi
        command: echo "hi integration!"
  1. Before these changes, execute okteto test "", you will get the error
  2. Then, compile this branch and execute the same command, you will see how all the tests are executed
  3. Verify you can still execute individual or specific tests. Verify you can pass more than one test container name

8000
Signed-off-by: Nacho Fuertes <nacho@okteto.com>
@ifbyol ifbyol added release/bug-fix run-e2e When used on a PR run windows & unix e2e labels Dec 10, 2024
Copy link
codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 47.74%. Comparing base (c572258) to head (060179b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4614      +/-   ##
==========================================
- Coverage   47.75%   47.74%   -0.01%     
==========================================
  Files         369      369              
  Lines       29706    29711       +5     
==========================================
  Hits        14186    14186              
- Misses      14421    14426       +5     
  Partials     1099     1099              

Signed-off-by: Nacho Fuertes <nacho@okteto.com>
Signed-off-by: Nacho Fuertes <nacho@okteto.com>
@ifbyol ifbyol marked this pull request as ready for review December 10, 2024 09:37
@ifbyol ifbyol requested a review from a team as a code owner December 10, 2024 09:37
@ifbyol ifbyol added the backport release-3.6 Backport this PR to CLI versions 3.6 label Dec 10, 2024
@ifbyol ifbyol merged commit 435f27a into master Dec 10, 2024
26 of 27 checks passed
@ifbyol ifbyol deleted the ifbyol/not-allow-empty-test-name branch December 10, 2024 10:59
github-actions bot pushed a commit that referenced this pull request Dec 10, 2024
* DEV-828: Removed check on integration tests to simulate error case

Signed-off-by: Nacho Fuertes <nacho@okteto.com>

* DEV-828: Don't allow empty strings as tests containers to run

Signed-off-by: Nacho Fuertes <nacho@okteto.com>

* DEV-828: Format correctly file

Signed-off-by: Nacho Fuertes <nacho@okteto.com>

---------

Signed-off-by: Nacho Fuertes <nacho@okteto.com>
(cherry picked from commit 435f27a)
ifbyol added a commit that referenced this pull request Dec 10, 2024
* DEV-828: Removed check on integration tests to simulate error case

Signed-off-by: Nacho Fuertes <nacho@okteto.com>

* DEV-828: Don't allow empty strings as tests containers to run

Signed-off-by: Nacho Fuertes <nacho@okteto.com>

* DEV-828: Format correctly file

Signed-off-by: Nacho Fuertes <nacho@okteto.com>

---------

Signed-off-by: Nacho Fuertes <nacho@okteto.com>
(cherry picked from commit 435f27a)

Co-authored-by: Ignacio Fuertes <nacho@okteto.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3.6 Backport this PR to CLI versions 3.6 release/bug-fix run-e2e When used on a PR run windows & unix e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0