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 logout command #2401

Merged

Conversation

narayanpai1
Copy link
Contributor

@narayanpai1 narayanpai1 commented Jun 13, 2020

What does this PR do?

It adds the logout command. The command lists out all the alias available in the RC File located in the home directory and prompts the user to select an alias to delete.

Usage

newman logout

Screenshots

image

Testing

  • The CLI and parser tests for the command are added.

The command deletes the data related to the alias
from the rc file located in the home directory.
Exclude logout folder from integration, unit and library coverage tests
@narayanpai1
Copy link
Contributor Author

@codenirvana Since the only additional code being checked in library coverage tests is in bin/newman.js, I don't feel the coverage for test/library can be increased. Hence, I updated the coverage threshold.

@codecov
Copy link

codecov bot commented Jul 15, 2020

Codecov Report

Merging #2401 into feature/login will increase coverage by 9.57%.
The diff coverage is 92.77%.

Impacted file tree graph

@@                Coverage Diff                @@
##           feature/login    #2401      +/-   ##
=================================================
+ Coverage          82.35%   91.93%   +9.57%     
=================================================
  Files                 23       24       +1     
  Lines               1281     1364      +83     
  Branches             360      377      +17     
=================================================
+ Hits                1055     1254     +199     
+ Misses               226      110     -116     
Flag Coverage Δ
#cli 83.79% <92.77%> (?)
#integration 42.00% <21.42%> (-0.26%) ⬇️
#library 58.61% <21.42%> (-0.47%) ⬇️
#unit 75.21% <50.00%> (-0.28%) ⬇️
Impacted Files Coverage Δ
lib/logout/index.js 91.30% <91.30%> (ø)
bin/newman.js 86.88% <100.00%> (+18.96%) ⬆️
lib/print/index.js 84.37% <100.00%> (+25.75%) ⬆️
lib/util.js 95.29% <0.00%> (+1.17%) ⬆️
bin/util.js 100.00% <0.00%> (+1.75%) ⬆️
lib/run/options.js 95.76% <0.00%> (+2.54%) ⬆️
lib/reporters/cli/cli-utils.js 81.57% <0.00%> (+10.52%) ⬆️
lib/reporters/cli/index.js 86.71% <0.00%> (+22.37%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8213df0...281963d. Read the comment docs.

@codenirvana codenirvana merged commit 724fa69 into postmanlabs:feature/login Jul 15, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants