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

Convert cli-test workflow into locally-runnable test harness #1654

Closed
3 of 5 tasks
btlghrants opened this issue Jan 14, 2025 · 0 comments · Fixed by #1642
Closed
3 of 5 tasks

Convert cli-test workflow into locally-runnable test harness #1654

btlghrants opened this issue Jan 14, 2025 · 0 comments · Fixed by #1642
Assignees
Labels
Testing Testing
Milestone

Comments

@btlghrants
Copy link
Collaborator

btlghrants commented Jan 14, 2025

Description

Introduce a new type of testing to Pepr: integration testing. Create a place in the code base for integration testing to live & set it up such that it allows for tests that:

  1. are larger in scope than unit tests but smaller in-scope than "full system" (i.e. the excellent-examples (e2es)),
  2. are developer-centric (as opposed to user-centric, like the journey tests),
  3. are intended to cover large-ish features comprehensively (e.g. all the pepr CLI flags),
  4. are runnable independently and/or in parallel, and
  5. can be run on a developer workstation.

Testing for the Pepr CLI is a great example of something that meets those conditions, so once a place for integration tests exists covert the CI-only tests in .github/workflows/cli-tests.yml over & then delete that workflow. That'll demonstrate / position the project with a nice place to put many of the CLI-focused (and various other) tests that don't-quite-fit within journey test suite as we move toward a post-#1597 world.

Background

Pepr currently has 3 suites of tests: unit tests, "journey" tests & in-cluster end-to-end tests (i.e. the excellent-examples). The team has long recognized that, of the three, the journey test suite has (by far) the least well defined scope / boundaries as it tests a lot of things, like: the pepr CLI, the hello-pepr.ts feature-demo Module, multiple deployment mechanisms, and more.

While not "wrong" per se -- nor surprising given the organic nature of it's growth since inception -- it also isn't right: it touches too many parts of the pepr code base not-quite-comprehensively, it takes a long time to run, it's hard to run pieces independently, etc. Issue #1597 -- which this Issue helps (partially / technically) address -- is a direct consequence of many of those not-so-ideal qualities & demonstrates the need for this work.

Related Issue

Relates to #1597 - in support of
Relates to #1640 - in preparation for

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@btlghrants btlghrants converted this from a draft issue Jan 14, 2025
@btlghrants btlghrants self-assigned this Jan 14, 2025
@btlghrants btlghrants added the Testing Testing label Jan 14, 2025
@btlghrants btlghrants added this to the v0.43.0 milestone Jan 14, 2025
@btlghrants btlghrants moved this from 🏗 In progress to 👀 In review in Pepr Project Board Jan 14, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 15, 2025
…ult in comparable output (#1642)

## Description

Adds a new `npm run test:int` (int == "integration") script to invoke a
new style of test -- integration tests -- where "integration" means
something like "wider in scope than unit tests" but "not requiring a
full K8s cluster" (general idea is to have a nice place for
non-k8s-required tests to land (e.g. client-side `pepr` CLI commands,
like init / build).

## Related Issue

Fixes #1654 

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging
- [x] Unit,
[Journey](https://github.com/defenseunicorns/pepr/tree/main/journey),
[E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples),
[docs](https://github.com/defenseunicorns/pepr/tree/main/docs),
[adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or
updated as needed
- [x] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Co-authored-by: Sam Mayer <[email protected]>
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Pepr Project Board Jan 15, 2025
tamirazrab pushed a commit to tamirazrab/pepr that referenced this issue Jan 17, 2025
…ult in comparable output (defenseunicorns#1642)

## Description

Adds a new `npm run test:int` (int == "integration") script to invoke a
new style of test -- integration tests -- where "integration" means
something like "wider in scope than unit tests" but "not requiring a
full K8s cluster" (general idea is to have a nice place for
non-k8s-required tests to land (e.g. client-side `pepr` CLI commands,
like init / build).

## Related Issue

Fixes defenseunicorns#1654 

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging
- [x] Unit,
[Journey](https://github.com/defenseunicorns/pepr/tree/main/journey),
[E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples),
[docs](https://github.com/defenseunicorns/pepr/tree/main/docs),
[adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or
updated as needed
- [x] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Co-authored-by: Sam Mayer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Testing
Projects
Status: ✅ Done
1 participant