circleci

package
v8.172.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package circleci mocks the CircleCI API v2 and CircleCI's OAuth issuer on one server: DEVCTL_CIRCLECI_API_URL is the server's URL plus APIPrefix, the path circleci.com serves the API under, and DEVCTL_CIRCLECI_OAUTH_URL is the server's URL. Every response comes from the scenario's route sequences, keyed by the full path ("GET /api/v2/project/gh/owner/repo/pipeline").

Index

Constants

View Source
const APIPrefix = "/api/v2"

APIPrefix is the path the API v2 lives under.

Variables

View Source
var NotFound = sequence.Response{
	Status: http.StatusNotFound,
	Body:   map[string]any{"message": "Not Found"},
}

NotFound is what an unscripted route answers, the way circleci.com does.

Functions

This section is empty.

Types

type Server

type Server struct {
	*httptest.Server
	// contains filtered or unexported fields
}

Server is a running mock.

func Start

func Start(routes sequence.Routes) (*Server, error)

Start serves the routes on a loopback port until Close.

func (*Server) APIURL

func (s *Server) APIURL() string

APIURL is the value of DEVCTL_CIRCLECI_API_URL.

func (*Server) Requests

func (s *Server) Requests() []sequence.Request

Requests are the requests received so far.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL