Skip to content

Commit

Permalink
Revert "Fix CVE states"
Browse files Browse the repository at this point in the history
This reverts commit 8f0967e.

The change introduced by this commit has not been released to currently
deployed production version of CVE Services. It will be made available when
CVE Services 2.x is generally available.
  • Loading branch information
mprpic committed Feb 5, 2022
1 parent 869d951 commit c1f5ede
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cvelib/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def show_cve(ctx, print_raw, cve_id):
@click.option("--year", callback=validate_year, help="Filter by year.")
@click.option(
"--state",
type=click.Choice(["reserved", "published", "rejected"], case_sensitive=False),
type=click.Choice(["reserved", "public", "reject"], case_sensitive=False),
help="Filter by reservation state.",
)
@click.option(
Expand Down
12 changes: 6 additions & 6 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_cve_list():
"owning_cna": "acme",
"requested_by": {"cna": "acme", "user": "ann"},
"reserved": "2021-01-14T18:32:57.955Z",
"state": "PUBLISHED",
"state": "PUBLIC",
"time": {
"created": "2021-01-14T18:32:57.956Z",
"modified": "2021-01-14T18:32:57.956Z",
Expand All @@ -63,7 +63,7 @@ def test_cve_list():
"owning_cna": "acme",
"requested_by": {"cna": "corp", "user": "eve"},
"reserved": "2021-01-14T18:34:50.916Z",
"state": "REJECTED",
"state": "REJECT",
"time": {
"created": "2021-01-14T18:34:50.917Z",
"modified": "2021-01-14T18:34:50.917Z",
Expand All @@ -76,10 +76,10 @@ def test_cve_list():
result = runner.invoke(cli, DEFAULT_OPTS + ["list"])
assert result.exit_code == 0, result.output
assert result.output == (
"CVE ID STATE OWNING CNA REQUESTED BY RESERVED\n"
"CVE-2021-3001 RESERVED acme bob (acme) Thu Jan 14 18:32:19 2021\n"
"CVE-2021-3002 PUBLISHED acme ann (acme) Thu Jan 14 18:32:57 2021\n"
"CVE-2021-3003 REJECTED acme eve (corp) Thu Jan 14 18:34:50 2021\n"
"CVE ID STATE OWNING CNA REQUESTED BY RESERVED\n"
"CVE-2021-3001 RESERVED acme bob (acme) Thu Jan 14 18:32:19 2021\n"
"CVE-2021-3002 PUBLIC acme ann (acme) Thu Jan 14 18:32:57 2021\n"
"CVE-2021-3003 REJECT acme eve (corp) Thu Jan 14 18:34:50 2021\n"
)


Expand Down

0 comments on commit c1f5ede

Please sign in to comment.