Skip to content

Commit

Permalink
test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebrandt committed Aug 21, 2024
1 parent 3716ceb commit 3ded533
Showing 1 changed file with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions data/time_series_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ func TestTimeSeriesSchema(t *testing.T) {
}
}

var FTV01 = data.FrameTypeVersion{0, 1}

func TestLongToWide(t *testing.T) {
tests := []struct {
name string
Expand Down Expand Up @@ -121,7 +123,8 @@ func TestLongToWide(t *testing.T) {
2.0,
4.0,
})).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -168,7 +171,8 @@ func TestLongToWide(t *testing.T) {
2.0,
4.0,
})).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -221,7 +225,8 @@ func TestLongToWide(t *testing.T) {
2,
4,
})).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -280,7 +285,8 @@ func TestLongToWide(t *testing.T) {
2,
4,
})).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -319,7 +325,8 @@ func TestLongToWide(t *testing.T) {
float64Ptr(2.0),
float64Ptr(4.0),
})).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -385,7 +392,8 @@ func TestLongToWide(t *testing.T) {
0.0,
6.0,
})).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),

Err: require.NoError,
Expand Down Expand Up @@ -452,7 +460,8 @@ func TestLongToWide(t *testing.T) {
nil,
float64Ptr(6.0),
})).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -548,7 +557,8 @@ func TestLongToWide(t *testing.T) {
6,
}),
).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -644,7 +654,8 @@ func TestLongToWide(t *testing.T) {
int64Ptr(6),
}),
).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -740,7 +751,8 @@ func TestLongToWide(t *testing.T) {
int64Ptr(6),
}),
).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -836,7 +848,8 @@ func TestLongToWide(t *testing.T) {
int64Ptr(6),
}),
).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -931,7 +944,8 @@ func TestLongToWide(t *testing.T) {
int64Ptr(6),
}),
).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -1026,7 +1040,8 @@ func TestLongToWide(t *testing.T) {
int64Ptr(6.0),
}),
).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down Expand Up @@ -1086,7 +1101,8 @@ func TestLongToWideBool(t *testing.T) {
1.0,
3.0,
})).SetMeta(&data.FrameMeta{
Type: data.FrameTypeTimeSeriesWide,
Type: data.FrameTypeTimeSeriesWide,
TypeVersion: FTV01,
}),
Err: require.NoError,
},
Expand Down

0 comments on commit 3ded533

Please sign in to comment.