gitlab icon indicating copy to clipboard operation
gitlab copied to clipboard

Rspec returns with error for tests in spec/gitlab/cli_spec.rb, but reports success

Open dleidert opened this issue 1 year ago • 3 comments

Hi,

when one runs the tests in spec/gitlab/cli_spec.rb, the respec command returns exit code 1:

rspec spec/gitlab/cli_spec.rb; echo $?

Randomized with seed 32489

Gitlab::CLI
  .run
    when command is users
      shows executed command
      shows users data
    when command is info
      shows environment info
    when command is version
      shows gem version
    when command is help
      shows available actions
    when command is user
      shows user data
      shows executed command
    when command is create_label
      shows executed command
  .start
    when fetching project with namespace/repo
      encodes delimiter
    when command with required fields

Finished in 0.05954 seconds (files took 0.22621 seconds to load)
10 examples, 0 failures

Randomized with seed 32489

1

As far as I can tell, this is caused by the tests "command with required/excluded fields". It seems that rspec stops on the spot and the remaining tests don't run through (there are 12 instead of 10 tests). Still, rspec doesn't report any error. I checked this issue with the latest ruby:3 docker container and I can verify that it is still there.

dleidert avatar Nov 01 '24 15:11 dleidert

Yes, it is a known problem https://github.com/NARKOZ/gitlab/issues/686#issuecomment-2166904428

NARKOZ avatar Nov 04 '24 14:11 NARKOZ

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 04 '25 01:02 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 06 '25 02:05 github-actions[bot]