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

Add more tests to tst.context.js #56

Closed
melloc opened this issue Jun 18, 2018 · 5 comments
Closed

Add more tests to tst.context.js #56

melloc opened this issue Jun 18, 2018 · 5 comments
Assignees

Comments

@melloc
Copy link
Contributor

melloc commented Jun 18, 2018

While looking at tst.context.js, I realized that it could do with some better tests.

@melloc melloc self-assigned this Jun 18, 2018
@melloc
Copy link
Contributor Author

melloc commented Jun 18, 2018

CR at https://cr.joyent.us/#/c/4251/

@davepacheco
Copy link
Contributor

I don't think I follow the cases that the new tests are intended to address. Could you maybe add some comments explaining what the test is doing? Also, is there a reason to drop the isError check?

@melloc
Copy link
Contributor Author

melloc commented Jun 20, 2018

I dropped the isError() check because it wasn't testing anything from verror, but the dependency it's using. The tests I've added indirectly test isError() through the verror functions and constructors.

@davepacheco
Copy link
Contributor

Thanks for the update! I moved the discussion to the CR. In summary, I prefer to keep the isError check but that's not a blocker.

@melloc
Copy link
Contributor Author

melloc commented Jul 16, 2019

I've run the test suite using several different versions of node:

% for arch in x86 x64; do for version in v0.10.48 v0.12.16 v4.8.1 v6.17.0 v8.15.1; do ( export PATH=$HOME/node-versions/node-$version-sunos-$arch/bin:$PATH; label="$(node -pe '[process.platform, process.arch, process.version].join(" ");')"; echo $label; ( echo $label; git reset --hard HEAD; git clean -fxd; V=1 npm install && make test ) &> "../output-$label.txt" ); done; done
sunos ia32 v0.10.48
sunos ia32 v0.12.16
sunos ia32 v4.8.1
sunos ia32 v6.17.0
sunos ia32 v8.15.1
sunos x64 v0.10.48
sunos x64 v0.12.16
sunos x64 v4.8.1
sunos x64 v6.17.0
sunos x64 v8.15.1

Looking at the results of the runs:

 % tail -n 8 output-sunos*
==> output-sunos ia32 v0.10.48.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos ia32 v0.12.16.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos ia32 v4.8.1.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos ia32 v6.17.0.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos ia32 v8.15.1.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos x64 v0.10.48.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos x64 v0.12.16.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos x64 v4.8.1.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos x64 v6.17.0.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

==> output-sunos x64 v8.15.1.txt <==
===================================================

Results:
        Tests passed:    8/ 8
        Tests failed:    0/ 8

===================================================
Cleaning up output from successful tests ... done.

joyent-automation pushed a commit that referenced this issue Jul 16, 2019
Reviewed by: David Pacheco <dap@joyent.com>
Approved by: David Pacheco <dap@joyent.com>
@melloc melloc closed this as completed Jul 16, 2019
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

No branches or pull requests

2 participants