fixtures

package
v0.0.0-...-9ca4c9f Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

README

Datadog Package fixtures

This directory contains a few examples of Datadog Packages for use in the updater tests.

simple-v1

datadog-package create --archive --version "v1" --archive-path "pkg/updater/fixtures/oci-layout-simple-v1.tar" --package "simple" --configs pkg/updater/fixtures/simple-v1-config pkg/updater/fixtures/simple-v1

simple-v2

datadog-package create --archive --version "v2" --archive-path "pkg/updater/fixtures/oci-layout-simple-v2.tar" --package "simple" --configs pkg/updater/fixtures/simple-v2-config pkg/updater/fixtures/simple-v2

simple-v1-linux2-amd128

datadog-package create --archive --version "v1" --os "linux2" --arch "amd128" --archive-path "pkg/updater/fixtures/oci-layout-simple-v1-linux2-amd128.tar" --package "simple" pkg/updater/fixtures/simple-v1

Documentation

Overview

Package fixtures contains test datadog package fixtures.

Package fixtures contains test datadog package fixtures.

Index

Constants

This section is empty.

Variables

View Source
var (
	// FixtureSimpleV1 is a simple package fixture with version v1.
	FixtureSimpleV1 = Fixture{
		Package: "simple",
		Version: "v1",
		// contains filtered or unexported fields
	}
	// FixtureSimpleV2 is a simple package fixture with version v2.
	FixtureSimpleV2 = Fixture{
		Package: "simple",
		Version: "v2",
		// contains filtered or unexported fields
	}
	// FixtureSimpleV1Linux2Amd128 is a simple package fixture with version v1 for linux/amd128.
	FixtureSimpleV1Linux2Amd128 = Fixture{
		Package: "simple",
		Version: "v1",
		// contains filtered or unexported fields
	}
)

Functions

func AssertEqualFS

func AssertEqualFS(t *testing.T, expected fs.FS, actual fs.FS)

AssertEqualFS asserts that two filesystems are equal.

Types

type Fixture

type Fixture struct {
	Package string
	Version string
	// contains filtered or unexported fields
}

Fixture represents a package fixture.

type Server

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

Server represents a test fixtures server.

func NewServer

func NewServer(t *testing.T) *Server

NewServer creates a new test fixtures server.

func (*Server) Client

func (s *Server) Client() *http.Client

Client returns the server client.

func (*Server) Close

func (s *Server) Close()

Close closes the test fixtures server.

func (*Server) ConfigFS

func (s *Server) ConfigFS(f Fixture) fs.FS

ConfigFS returns the config FS for the given fixture.

func (*Server) PackageFS

func (s *Server) PackageFS(f Fixture) fs.FS

PackageFS returns the package FS for the given fixture.

func (*Server) PackageLayoutURL

func (s *Server) PackageLayoutURL(f Fixture) string

PackageLayoutURL returns the package layout URL for the given fixture.

func (*Server) PackageURL

func (s *Server) PackageURL(f Fixture) string

PackageURL returns the package URL for the given fixture.

func (*Server) URL

func (s *Server) URL() string

URL returns the server URL.

Jump to

Keyboard shortcuts

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