defenseunicorns / pepr-excellent-examples

Welcome to the Pepr Examples Repository!
https://pepr.dev
4 stars 0 forks source link

Display accurate version of pepr in test logs #160

Closed samayer12 closed 1 week ago

samayer12 commented 2 weeks ago

I noticed a mismatch between reported pepr versions in the test logs. This PR fixes that mismatch.

Note how the example below reports 0.37.2 and 0.36.0 as in use during the same test run.

Example:

❯ npm run test:e2e -w hello-pepr-store

[...]

Pepr Version under test: 0.37.2

Pepr Image under test: sha256:deba991c2df63ab0099de55f5440703d2d17d6ebe635595badf0bc7d04715cbe [pepr:dev]

[...]

  console.time
    pepr@0.36.0 ready (total time): 32814 ms

      at moduleUp (../_helpers/src/pepr.ts:133:11)
btlghrants commented 2 weeks ago

Since this edit moves to using npx to resolve the in-scope pepr version to use, you should probably cut the "pepr": "npx pepr@0.36.0" script out of the root level scripts block too (here: https://github.com/defenseunicorns/pepr-excellent-examples/blob/main/package.json#L5C1-L6C1)

That peprVersion helper & this pepr script rolled as a pair and are only there because (once upon a time) we were trying to funnel all test runs through a single version of pepr (as defined in the root script) by invoking them through that script. This PR'll obviate the need for that script so we should just pull it out too.