apache / apache/openwhisk-cli

wsk activation get <id> --last is buggy

Offen
#322 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
bug good first issue help wanted
Vorherrschende Sprache
Go
Sterne
109
Forks
98
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

This test is a false positive, and will need a unit go test to properly test this:

https://github.com/apache/incubator-openwhisk-cli/blob/ed795ede797e3730669cdaa2453be96e5f5e7d0b/tests/src/test/scala/system/basic/WskCliBasicTests.scala#L973

The test succeeds only because there are activations in the database. Try it on an empty database:

```
> wsk -i activation get x --last
error: Unable to get activation: Activation list does not contain any activations.
Run 'wsk --help' for usage.
```

the parameter validation is wrong and it goes on to query the API for the activations, which should not happen.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with tests/src/test/scala/system/basic/WskCliBasicTests.scala at line 973 and reproduce the `wsk activation get --last` case against an empty database. Trace the command's parameter validation and add the requested unit Go test. Done means the invalid case is caught before querying the API and the test no longer passes only when activations exist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
go, scala
Bereich
cli, testing
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.