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

Variables used in the "Setting up a multifile test suite" section of the Tutorial #614

Open
hrishikesh-kadam opened this issue Jun 26, 2022 · 2 comments
Labels
Component: Docs Priority: Medium Wrong or misleading documentation, broken behavior with workaround Size: Medium Changes in the same file Status: Confirmed The reproducer worked as described Type: Bug

Comments

@hrishikesh-kadam
Copy link
Contributor

hrishikesh-kadam commented Jun 26, 2022

Describe the bug
In the Setting up a multifile test suite section of the Tutotial,
I am unable to understand the use of $NON_EXISTANT_FIRST_RUN_FILE and $EXISTING_FIRST_RUN_FILE variables.
I feel something is wrong here.

@hrishikesh-kadam hrishikesh-kadam added Priority: NeedsTriage Issue has not been vetted yet Type: Bug labels Jun 26, 2022
@martin-schulze-vireso martin-schulze-vireso added Component: Docs Priority: Medium Wrong or misleading documentation, broken behavior with workaround Size: Medium Changes in the same file Status: Confirmed The reproducer worked as described and removed Priority: NeedsTriage Issue has not been vetted yet labels Jun 26, 2022
@martin-schulze-vireso
Copy link
Member

martin-schulze-vireso commented Jun 26, 2022

Yes, this is an oversight. The test passes accidentally, but switching the order would have exposed the problem. Later changes add the file as parameter, which is necessary for this test. You can also follow the repository at martin-schulze-vireso/bats-tutorial

@Victoremepunto
Copy link

Yes, this is an oversight. The test passes accidentally, but switching the order would have exposed the problem. Later changes add the file as parameter, which is necessary for this test. You can also follow the repository at martin-schulze-vireso/bats-tutorial

I've checked the repository at martin-schulze-vireso/bats-tutorial and this still has the same issue where the helper test keeps failing on the first assertion. The following is an excerpt of the output as of today:

./test/bats/bin/bats test
 ✗ Check first run
   (from function `assert' in file test/test_helper/bats-assert/src/assert.bash, line 40,
    in test file test/helper.bats, line 16)
     `assert _is_first_run' failed
   
   -- assertion failed --
   expression : _is_first_run
   --
   
 ✓ server is reachable
 - Show welcome message on first invocation (skipped: The FIRST_RUN_FILE already exists)

3 tests, 1 failure, 1 skipped

I tried to "fix it" with martin-schulze-vireso/bats-tutorial#1 but I'm not sure if that was the intention anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Docs Priority: Medium Wrong or misleading documentation, broken behavior with workaround Size: Medium Changes in the same file Status: Confirmed The reproducer worked as described Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants