fj/tests/functional
sid c3e8ad67ed
Some checks are pending
CI / lint (push) Waiting to run
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / functional (push) Blocked by required conditions
complete fgj → fj rename: env vars, config migration, docs
- Rename env vars: FGJ_HOST → FJ_HOST, FGJ_TOKEN → FJ_TOKEN,
  FGJ_FORCE_TTY → FJ_FORCE_TTY, FGJ_PAGER → FJ_PAGER,
  FGJ_BINARY_PATH → FJ_BINARY_PATH (all with legacy fallback)
- Auto-migrate ~/.config/fgj/ → ~/.config/fj/ on first run
- Update man page title, README, CHANGELOG
- Update test fixture labels from [FGJ E2E Test] to [FJ E2E Test]
2026-04-26 08:23:48 -06:00
..
fixtures.go complete fgj → fj rename: env vars, config migration, docs 2026-04-26 08:23:48 -06:00
functional_test.go complete fgj → fj rename: env vars, config migration, docs 2026-04-26 08:23:48 -06:00
README.md docs: don't mention non existing file in func tests doc 2025-12-16 12:46:31 +01:00

Functional Tests

End-to-end tests that make real API calls to a Codeberg instance.

Running Tests

These tests require special setup and credentials.

Quick Start

export CODEBERG_TEST_TOKEN="your_token"
export CODEBERG_TEST_OWNER="test-account-username"
export CODEBERG_TEST_REPO="test-repo-name"

go test -v -race -tags=functional ./...

What They Test

  • API authentication and connectivity
  • Repository listing and details
  • Issue creation, listing, retrieval
  • Issue comments
  • API error handling
  • Repository secrets and actions (if available)

CI Integration

These tests run automatically in CI when configured:

  • Only on main branch and pull requests
  • Requires CODEBERG_TEST_TOKEN secret and configuration variables
  • Uses a dedicated test account (not your personal account)

Files

  • functional_test.go - Test suite with all test cases
  • fixtures.go - Helper functions and test environment setup