testing

package
v0.0.0-...-f9df99f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cases = map[string]testCase{
	"good": {
		tus.Metadata{
			"data_stream_id":    "dextesting",
			"data_stream_route": "testevent1",
			"sender_id":         "test",
			"data_producer_id":  "test",
			"jurisdiction":      "test",
			"received_filename": "test",
		},
		nil,
		[]info.FileDeliveryStatus{
			{},
		},
	},
	"bad missing data_stream_id": {
		tus.Metadata{
			"data_stream_route": "testevent1",
			"sender_id":         "test",
			"data_producer_id":  "test",
			"jurisdiction":      "test",
			"received_filename": "test",
		},
		tus.ClientError{
			Code: 400,
		},
		[]info.FileDeliveryStatus{
			{},
		},
	},
	"bad missing data_stream_route": {
		tus.Metadata{
			"data_stream_id":    "dextesting",
			"sender_id":         "test",
			"data_producer_id":  "test",
			"jurisdiction":      "test",
			"received_filename": "test",
		},
		tus.ClientError{
			Code: 400,
		},
		[]info.FileDeliveryStatus{
			{},
		},
	},
	"eicr bad (missing things)": {
		tus.Metadata{
			"data_stream_id":    "eicr",
			"data_stream_route": "fhir",
			"sender_id":         "APHL",
			"original_filename": "test",
			"message_type":      "bad",
		},
		tus.ClientError{
			Code: 400,
		},
		[]info.FileDeliveryStatus{
			{},
		},
	},
	"eicr good": {
		tus.Metadata{
			"data_stream_id":          "eicr",
			"data_stream_route":       "fhir",
			"data_producer_id":        "test",
			"sender_id":               "APHL",
			"received_filename":       "test",
			"jurisdiction":            "test",
			"meta_ext_objectkey":      "test",
			"meta_ext_file_timestamp": "test",
		},
		nil,
		[]info.FileDeliveryStatus{
			{},
		},
	},
}

Functions

func RunTusTestCase

func RunTusTestCase(url string, testFile string, c testCase) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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