GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add unit tests for `resolveBuilder` in `cmd/ci/config.go` · Issue #3568 · knative/func

Add unit tests for resolveBuilder in cmd/ci/config.go #3568

New issue
Copy link
New issue
Copy link
Closed
#3570
Closed
Add unit tests for resolveBuilder in cmd/ci/config.go#3568
#3570
Copy link
Assignees
Ankitsinghsisodya

Description

@Ankitsinghsisodya
Ankitsinghsisodya
opened on Apr 1, 2026
Issue body actions

Issue: Add unit tests for resolveBuilder in cmd/ci/config.go

Summary

The unexported resolveBuilder function in cmd/ci/config.go has
zero test coverage. It contains non-trivial branching logic that
selects the correct build strategy (host, pack, or s2i) for
each supported runtime × local/remote combination.

Motivation

  • resolveBuilder drives which build tool is injected into the generated
    GitHub Actions workflow. A regression here silently produces wrong CI
    workflows — broken builds, wrong builders, or undetected unsupported runtimes.
  • Trivial one-liner getter/accessor methods do not need tests — they
    only verify Go's struct field assignment, not any real logic.
  • The fix is pure value-add: no mocks, no cluster, no network needed.

Proposed Change

Add a new file cmd/ci/config_test.go (package ci) with a single
focused, table-driven test:

Sub-case Expected builder
go + local host
go + remote pack
node, typescript, rust, quarkus, springboot (any) pack
python + local host
python + remote s2i
unknown runtime error

Affected Files

  • New: cmd/ci/config_test.go

Labels

kind/test, good first issue

Activity

  1. Ankitsinghsisodya commented on Apr 1, 2026

    @Ankitsinghsisodya
    Ankitsinghsisodya
    on Apr 1, 2026
    ContributorAuthor
    More actions

    /assign

  2. knative-prow
    assigned
    Ankitsinghsisodya
    on Apr 1, 2026
  3. Ankitsinghsisodya
    changed the title [-]Add unit tests for cmd/ci/config.go accessors[/-] [+]Add unit tests for `resolveBuilder` in `cmd/ci/config.go`[/+] on Apr 1, 2026
  4. knative-prow
    closed this as completedin #3570on Apr 30, 2026
  5. lkingland
    added
    status/ready
    on May 8, 2026
  6. lkingland
    added this to Functions Traigeon May 8, 2026
  7. github-project-automation
    moved this from Ready to Done in Functions Traigeon May 8, 2026
  8. lkingland
    moved this to Ready in Functions Traigeon May 8, 2026
  9. lkingland
    reopened this on May 8, 2026
  10. github-project-automation
    moved this from Done to Planning in Functions Traigeon May 8, 2026
  11. lkingland
    moved this from Planning to Ready in Functions Traigeon May 8, 2026
  12. lkingland
    closed this as completedon May 16, 2026
  13. github-project-automation
    moved this from Ready to Done in Functions Traigeon May 16, 2026
  14. lkingland
    added
    status/done
    and removed
    status/ready
    on May 16, 2026
  15. lkingland
    reopened this on May 18, 2026
  16. github-project-automation
    moved this from Done to Planning in Functions Traigeon May 18, 2026
  17. lkingland
    moved this from Planning to Done in Functions Traigeon May 18, 2026
  18. lkingland
    closed this as completedby moving to Done in Functions Traigeon May 18, 2026
  19. lkingland
    reopened this on Jun 2, 2026
  20. github-project-automation
    moved this from Done to Planning in Functions Traigeon Jun 2, 2026
  21. lkingland
    moved this from Planning to Done in Functions Traigeon Jun 2, 2026
  22. lkingland
    closed this as completedby moving to Done in Functions Traigeon Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Ankitsinghsisodya
    Ankitsinghsisodya

Labels

No labels
No labels

Type

No type

Projects

  • Functions Traige
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.