From 43becfd66ab5508d0d1069c51339f7a5cc1b3d64 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Mon, 25 Mar 2024 20:22:30 +0000 Subject: [PATCH] [WIP] Copy private data indexes to release dir Signed-off-by: James Taylor --- cmd/release/main_test.go | 5 +++++ .../assetCollection/indexes/indexOwner.json | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 cmd/release/testdata/buildwithindexes/META-INF/statedb/couchdb/collections/assetCollection/indexes/indexOwner.json diff --git a/cmd/release/main_test.go b/cmd/release/main_test.go index 156a364..67c6f4f 100644 --- a/cmd/release/main_test.go +++ b/cmd/release/main_test.go @@ -48,8 +48,13 @@ var _ = Describe("Main", func() { indexPath := filepath.Join(tempDir, "statedb", "couchdb", "indexes", "indexOwner.json") Expect(indexPath).To(BeARegularFile()) + + privateDataCollectionIndexPath := filepath.Join(tempDir, "statedb", "couchdb", "collections", "assetCollection", "indexes", "indexOwner.json") + Expect(privateDataCollectionIndexPath).To(BeARegularFile()) + textPath := filepath.Join(tempDir, "statedb", "couchdb", "indexes", "test.txt") Expect(textPath).NotTo(BeAnExistingFile()) + subdirPath := filepath.Join( tempDir, "statedb", diff --git a/cmd/release/testdata/buildwithindexes/META-INF/statedb/couchdb/collections/assetCollection/indexes/indexOwner.json b/cmd/release/testdata/buildwithindexes/META-INF/statedb/couchdb/collections/assetCollection/indexes/indexOwner.json new file mode 100644 index 0000000..28ab876 --- /dev/null +++ b/cmd/release/testdata/buildwithindexes/META-INF/statedb/couchdb/collections/assetCollection/indexes/indexOwner.json @@ -0,0 +1,11 @@ +{ + "index": { + "fields": [ + "objectType", + "owner" + ] + }, + "ddoc": "indexOwnerDoc", + "name": "indexOwner", + "type": "json" +}