Skip to content

Commit

Permalink
add library elements data type to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PoorlyDefinedBehaviour committed Sep 24, 2024
1 parent 90dfce2 commit c14d130
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")})
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c14d130

Please sign in to comment.