tasks

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TestSaveMessage = "save_message"
	TestQueue       = "queue"
	TestQueueWait   = "queue_wait"
)
View Source
const TestMessage = "Test!"

Variables

View Source
var SaveMessage = suite.Test{
	Name: TestSaveMessage,
	Test: func(request *suite.TestRequest) error {
		var messages = []db.Object{&item.Message{
			Id:      0,
			Message: TestMessage,
			Created: time.Now(),
		}}
		if err := db.Save(messages); err != nil {
			return fmt.Errorf("error saving message to client; %w", err)
		}
		message, err := item.GetMessage(0)
		if err != nil {
			return fmt.Errorf("error getting message from client; %w", err)
		}
		if message.Message != TestMessage {
			return fmt.Errorf("error message unexpected: %s", message.Message)
		}
		return nil
	},
}

Functions

func GetTests

func GetTests() []suite.Test

Types

This section is empty.

Jump to

Keyboard shortcuts

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