API for testing

Issues

  • https://github.com/voedger/voedger/issues/1647

Motivation

As a developer I want to:

  • Prepare test context data for storages like Record, View

  • Prepare test context data for storages like ArgumentObject, WLog, HTTP, etc.

Storages

	StorageEvent          = "sys.Event"
	StorageSendMail       = "sys.SendMail"
	StorageRecord         = "sys.Record"
	StorageView           = "sys.View"
	StorageWLog           = "sys.WLog"
	StoragePLog           = "sys.PLog"
	StorageHttp           = "sys.Http"
	StorageAppSecret      = "sys.AppSecret"
	StorageRequestSubject = "sys.RequestSubject"
	StorageResult         = "sys.Result"
	StorageCommandContext = "sys.CommandContext"

Context

  • https://github.com/voedger/voedger/blob/937875623f4291dd33eece8787a817cd71ac7019/pkg/iextenginewazero/impl_test.go#L37

Proposal

packages

  • state

    • safestate

    • teststate

Functional design

Test examples:

Technical design

Principles

  • Use events to prepare context CUDs and IArgumentObject data

  • Use IAppStructs to prepare View context

  • IEvents.PutWlog to prepare WLog context

  • SafeStateAPI is a low-level API for State which implements the following principles:

    • used by extension engines

    • automatically converts package paths (extensions work with full paths)

    • Keys, Values, Key- and Value-Builders are represented with numbers, to be transferred between Host and Extension environments.

Design

Issues

  • https://github.com/voedger/voedger/issues/1647

Last updated

Was this helpful?