From c14d1306deb073891e820a7400664fac2f08a24f Mon Sep 17 00:00:00 2001 From: PoorlyDefinedBehaviour Date: Tue, 24 Sep 2024 14:13:46 -0300 Subject: [PATCH] add library elements data type to tests --- src/snapshot_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/snapshot_test.go b/src/snapshot_test.go index b9392a5..e7ec0e7 100644 --- a/src/snapshot_test.go +++ b/src/snapshot_test.go @@ -49,10 +49,13 @@ func TestCreateSnapshot(t *testing.T) { dashboards := generateItems(string(DashboardDataType), 10_000) + libraryElements := generateItems(string(LibraryElementDataType), 10_000) + // Write the resources to the snapshot. require.NoError(t, writer.Write(string(DatasourceDataType), datasources)) require.NoError(t, writer.Write(string(FolderDataType), folders)) require.NoError(t, writer.Write(string(DashboardDataType), dashboards)) + require.NoError(t, writer.Write(string(LibraryElementDataType), libraryElements)) // Write the index file. indexFilePath, err := writer.Finish(FinishInput{SenderPublicKey: senderPublicKey[:], Metadata: []byte("metadata")}) @@ -90,6 +93,7 @@ func TestCreateSnapshot(t *testing.T) { assert.Equal(t, datasources, resources[string(DatasourceDataType)]) assert.Equal(t, folders, resources[string(FolderDataType)]) assert.Equal(t, dashboards, resources[string(DashboardDataType)]) + assert.Equal(t, libraryElements, resources[string(LibraryElementDataType)]) } func TestChecksumIsValidated(t *testing.T) {