compliant

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupportedSpecVersion added in v1.3.1

func IsSupportedSpecVersion(version string) bool

func NewPrinter

func NewPrinter(debug bool) printer

func NewPrinterWithOptions

func NewPrinterWithOptions(debug bool, w io.Writer) printer

func NewReporter

func NewReporter(config RunConfig, debug bool, doneSignal chan<- bool, serverAddr string) reporter

func NewTestCase

func NewTestCase(name string, steps []step.Step) testCase

func NewTestCaseBuilder

func NewTestCaseBuilder(name string) *testCaseBuilder

func NewTester

func NewTester() *tester

func ZipReportFiles

func ZipReportFiles(files []ReportFile) (*bytes.Buffer, error)

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(id, name, spec string) *Builder

func (*Builder) Build

func (b *Builder) Build() Scenario

func (*Builder) TestCase

func (b *Builder) TestCase(tc ...TestCase) *Builder

type DCR32Config

type DCR32Config struct {
	OpenIDConfig       openid.Configuration
	SSA                string
	KID                string
	RedirectURIs       []string
	TokenSigningMethod jwt.SigningMethod
	PrivateKey         *rsa.PrivateKey
	SecureClient       *http2.Client
	GetImplemented     bool
	PutImplemented     bool
	DeleteImplemented  bool
	AuthoriserBuilder  auth.AuthoriserBuilder
	SchemaValidator    schema.Validator
}

func NewDCR32Config

func NewDCR32Config(
	openIDConfig openid.Configuration,
	ssa, aud, kid, issuer string,
	redirectURIs []string,
	signingKeyPEM string,
	transportSigningKeyPEM string,
	transportCertPEM string,
	transportCertSubjectDn string,
	transportRootCAs []string,
	getImplemented bool,
	putImplemented bool,
	deleteImplemented bool,
	tlsSkipVerify bool,
	specVersion string,
) (DCR32Config, error)

type DebugLine

type DebugLine struct {
	Time     string         `json:"time,omitempty"`
	Message  string         `json:"message,omitempty"`
	Scenario ReportScenario `json:"scenario,omitempty"`
	Testcase ReportTestcase `json:"testcase,omitempty"`
	Result   ReportStep     `json:"result,omitempty"`
}

type ListenerFunc

type ListenerFunc func(result ManifestResult) error

type Manifest

type Manifest interface {
	Run() ManifestResult
	Scenarios() Scenarios
	Name() string
	Version() string
}

func NewDCR32

func NewDCR32(cfg DCR32Config) (Manifest, error)

func NewDCR33 added in v1.3.1

func NewDCR33(cfg DCR32Config) (Manifest, error)

func NewFilteredManifest

func NewFilteredManifest(manifest Manifest, expression string) (Manifest, error)

func NewManifest

func NewManifest(name, version string, scenarios Scenarios) (Manifest, error)

func NewSpecManifest added in v1.3.1

func NewSpecManifest(version string, cfg DCR32Config) (Manifest, error)

type ManifestResult

type ManifestResult struct {
	Results []ScenarioResult
	Name    string
	Version string
}

func (ManifestResult) Fail

func (r ManifestResult) Fail() bool

type Report

type Report struct {
	Name      string           `json:"name"`
	Version   string           `json:"version"`
	Pass      bool             `json:"pass"`
	Scenarios []ReportScenario `json:"scenarios,omitempty"`
}

type ReportFile

type ReportFile struct {
	Name string
	Body string
}

type ReportScenario

type ReportScenario struct {
	Id        string           `json:"id"`
	Name      string           `json:"name"`
	Spec      string           `json:"spec"`
	Pass      bool             `json:"pass"`
	TestCases []ReportTestcase `json:"test_cases,omitempty"`
}

type ReportStep

type ReportStep struct {
	Name   string   `json:"name"`
	Pass   bool     `json:"pass"`
	Reason string   `json:"reason,omitempty"`
	Debug  []string `json:"debug,omitempty"`
}

type ReportTestcase

type ReportTestcase struct {
	Name  string       `json:"name"`
	Pass  bool         `json:"pass"`
	Steps []ReportStep `json:"steps,omitempty"`
}

type RunConfig added in v1.2.1

type RunConfig struct {
	WellknownEndpoint string
	GetImplemented    bool
	PutImplemented    bool
	DeleteImplemented bool
	Environment       string
	Brand             string
}

type Scenario

type Scenario interface {
	Run() ScenarioResult
	Id() string
	Name() string
	Spec() string
}

func DCR32CreateInvalidRegistrationRequest

func DCR32CreateInvalidRegistrationRequest(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) Scenario

func DCR32CreateSoftwareClient

func DCR32CreateSoftwareClient(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) Scenario

func DCR32DeleteSoftwareClient

func DCR32DeleteSoftwareClient(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) Scenario

func DCR32RegisterSoftwareWrongResponseType added in v1.2.1

func DCR32RegisterSoftwareWrongResponseType(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) Scenario

func DCR32RetrieveSoftwareClient

func DCR32RetrieveSoftwareClient(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
	validator schema.Validator,
) Scenario

func DCR32RetrieveSoftwareClientWrongId

func DCR32RetrieveSoftwareClientWrongId(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) Scenario

func DCR32RetrieveWithInvalidCredentials

func DCR32RetrieveWithInvalidCredentials(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) Scenario

func DCR32UpdateSoftwareClient

func DCR32UpdateSoftwareClient(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) Scenario

func DCR32UpdateSoftwareClientWithWrongId

func DCR32UpdateSoftwareClientWithWrongId(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) Scenario

func DCR32ValidateOIDCConfigRegistrationURL

func DCR32ValidateOIDCConfigRegistrationURL(cfg DCR32Config) Scenario

func NewScenario

func NewScenario(id, name, spec string, tcs []TestCase) Scenario

type ScenarioResult

type ScenarioResult struct {
	Id   string
	Name string
	Spec string
	TestCaseResults
}

type Scenarios

type Scenarios []Scenario

type ScenariosResult

type ScenariosResult []ScenarioResult

func (ScenariosResult) Fail

func (r ScenariosResult) Fail() bool

type TestCase

type TestCase interface {
	Run(ctx step.Context) TestCaseResult
}

func DCR32CreateSoftwareClientTestCases

func DCR32CreateSoftwareClientTestCases(
	cfg DCR32Config,
	secureClient *http.Client,
	authoriserBuilder auth.AuthoriserBuilder,
) []TestCase

func DCR32DeleteSoftwareClientTestCase added in v1.2.1

func DCR32DeleteSoftwareClientTestCase(
	cfg DCR32Config,
	secureClient *http.Client,
) TestCase

func DCR32RetrieveSoftwareClientTestCase added in v1.2.1

func DCR32RetrieveSoftwareClientTestCase(
	cfg DCR32Config,
	secureClient *http.Client,
	validator schema.Validator,
) TestCase

type TestCaseResult

type TestCaseResult struct {
	Name string
	step.Results
}

type TestCaseResults

type TestCaseResults []TestCaseResult

func (TestCaseResults) Fail

func (r TestCaseResults) Fail() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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