tests

package
v1.0.0-develop.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLSchemaType        = "CL-Schema"
	SchemaData          = "{\"attr\":[\"name\",\"age\"]}"
	TestResourceName    = "Test Resource Name"
	JsonResourceType    = "application/json"
	ResourceId          = "988b0ab3-6a39-4598-83ec-b84c6cf8da15"
	AnotherResourceId   = "71583c78-f16f-11ec-9dd4-cba0f34eb177"
	IncorrectResourceId = "1234"

	NotFoundDIDIdentifier = "nfdnfdnfdnfdnfdd"
	ExistingDIDIdentifier = "eeeeeeeeeeeeeeee"
	ExistingDID           = "did:cheqd:test:" + ExistingDIDIdentifier
	ExistingDIDKey        = ExistingDID + "#key-1"
)

Variables

This section is empty.

Functions

func ExistingResource

func ExistingResource() types.Resource

func GenerateCreateResourcePayload

func GenerateCreateResourcePayload(resource types.Resource) *types.MsgCreateResourcePayload

func GenerateTestKeys

func GenerateTestKeys() map[string]cheqdtests.KeyPair

Types

type TestSetup

type TestSetup struct {
	cheqdtests.TestSetup

	ResourceKeeper  keeper.Keeper
	ResourceHandler sdk.Handler
	QueryServer     types.QueryServer
}

func InitEnv

func InitEnv(t *testing.T, publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey) TestSetup

func Setup

func Setup() TestSetup

func (*TestSetup) SendCreateResource

func (s *TestSetup) SendCreateResource(msg *types.MsgCreateResourcePayload, keys map[string]ed25519.PrivateKey) (*types.Resource, error)

func (*TestSetup) WrapCreateRequest

func (s *TestSetup) WrapCreateRequest(payload *types.MsgCreateResourcePayload, keys map[string]ed25519.PrivateKey) *types.MsgCreateResource

Jump to

Keyboard shortcuts

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