Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

cli: Make example tests smarter

Aperta
#328 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
cli, testing

Direzione di ricerca

Inizia ispezionando le definizioni degli esempi utilizzate da make examples, insieme ai file .static e .out. Determina come viene attualmente confrontato l’output degli esempi, quindi verifica che sia possibile escludere campi dinamici come l’altezza più recente, l’hash del blocco e l’epoca, continuando a controllare il resto dell’output e assicurandoti che gli esempi corrispondenti non rigenerino i file .out.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ci tests

We have way too much .static examples meaning the output is not actually tested inside CI. I suggest we get rid of using .static for content that changes often and try to make a "smarter" diff.

For example, recent regression caused that ParaTime names got lost:

$ oasis network status
=== NETWORK STATUS ===
Network:      localhost_testnet
Node's ID:    5MsgQwijUlpH9+0Hbyors5jwmx7tTmKMA4c9leV3prI=
Core version: 24.3

==== Consensus ====
Status:               syncing
Version:              7.0.0
Chain context:        0b91b8e4e44b2003a7c5e23ddadb5e14ef5345c0ebcb3ddcae07fa2f244cab76
Latest height:        24115729 (2024-11-28 08:29:38 +0100 CET)
Latest block hash:    b7a9ad2fe687b9b2887512b03707347b0ec743020a175bc45c09979e3cc90d82
Latest epoch:         40176
Is validator:         false
Registration:         false

==== ParaTimes ====
  Status:               waiting for consensus sync
  Latest round:         7933058 (2024-11-28 08:29:38 +0100 CET)
  Last finalized round: 18446744073709551615
  Storage status:       initializing
  Number of peers:      23
  Status:               waiting for consensus sync
  Latest round:         8930789 (2024-11-28 08:29:38 +0100 CET)
  Last finalized round: 18446744073709551615
  Storage status:       initializing
  Number of peers:      22
  Status:               waiting for consensus sync
  Latest round:         9219372 (2024-11-28 08:29:38 +0100 CET)
  Last finalized round: 18446744073709551615
  Storage status:       initializing
  Number of peers:      23

We should ignore the latest height, block hash and epoch in this case, but still test everything else.

Perhaps a kind of a regex "mask" per example that should define how the output should look like. So when you run "make examples" and the regex is matched, then don't generate the new .out files.

Lingua principale
Go
Stelle
80
Fork
23
Merge medio
9h 43m
PR unite (30g)
3

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di oasisprotocol/cli

Tutte le issue di oasisprotocol/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.