package unit

import "github.com/aws/aws-sdk-go-v2/internal/awstesting/unit"

Package unit performs initialization and validation for unit tests

Index

Variables

var RSAPrivateKey = &rsa.PrivateKey{
	PublicKey: rsa.PublicKey{
		N: fromBase10("" /* 619 byte string literal not displayed */),
		E: 3,
	},
	D: fromBase10("" /* 618 byte string literal not displayed */),
	Primes: []*big.Int{
		fromBase10("" /* 311 byte string literal not displayed */),
		fromBase10("" /* 311 byte string literal not displayed */),
	},
}

RSAPrivateKey is used for testing functionality that requires some sort of private key. Taken from crypto/rsa/rsa_test.go

Credit to golang 1.11

Functions

func Config

func Config() aws.Config

Config returns a copy of the mock configuration for unit tests.

Types

type StubCredentialsProvider

type StubCredentialsProvider struct{}

StubCredentialsProvider provides a stub credential provider that returns static credentials that never expire.

func (StubCredentialsProvider) Retrieve

Retrieve satisfies the CredentialsProvider interface. Returns stub credential value, and never error.

Source Files

unit.go

Version
v1.36.3 (latest)
Published
Feb 27, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
1 hour ago

Tools for package owners.