mirror of https://bitbucket.org/ausocean/av.git
meta: use specific metadata keys in tests, not main package
This commit is contained in:
parent
fdf17f3a97
commit
6d5cfb5337
|
@ -104,8 +104,8 @@ const (
|
|||
// Used to consistently read and write MTS metadata entries.
|
||||
const (
|
||||
WriteRateKey = "writeRate"
|
||||
TimestampKey = meta.TimestampKey
|
||||
LocationKey = meta.LocationKey
|
||||
TimestampKey = "ts"
|
||||
LocationKey = "loc"
|
||||
)
|
||||
|
||||
// Meta allows addition of metadata to encoded mts from outside of this pkg.
|
||||
|
|
|
@ -52,19 +52,13 @@ const (
|
|||
dataLenIdx = 2
|
||||
)
|
||||
|
||||
// Used to consistently read and write metadata entries.
|
||||
const (
|
||||
TimestampKey = "ts"
|
||||
LocationKey = "loc"
|
||||
)
|
||||
|
||||
var (
|
||||
errKeyAbsent = errors.New("Key does not exist in map")
|
||||
errInvalidMeta = errors.New("Invalid metadata given")
|
||||
ErrUnexpectedMetaFormat = errors.New("Unexpected meta format")
|
||||
)
|
||||
|
||||
// Metadata provides functionality for the storage and encoding of metadata
|
||||
// Data provides functionality for the storage and encoding of metadata
|
||||
// using a map.
|
||||
type Data struct {
|
||||
mu sync.RWMutex
|
||||
|
|
|
@ -32,11 +32,13 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
tstKey1 = LocationKey
|
||||
tstData1 = "a,b,c"
|
||||
tstKey2 = TimestampKey
|
||||
tstData2 = "12345678"
|
||||
tstData3 = "d,e,f"
|
||||
TimestampKey = "ts"
|
||||
LocationKey = "loc"
|
||||
tstKey1 = LocationKey
|
||||
tstData1 = "a,b,c"
|
||||
tstKey2 = TimestampKey
|
||||
tstData2 = "12345678"
|
||||
tstData3 = "d,e,f"
|
||||
)
|
||||
|
||||
// TestAddAndGet ensures that we can add metadata and then successfully get it.
|
||||
|
|
Loading…
Reference in New Issue