Use .json extension for message exports (#4600)
We were previously exporting json but without the proper file extension. --- #### Does this PR need a docs update or release note? - [x] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [ ] ⛔ No #### Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🌻 Feature - [x] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Supportability/Tests - [ ] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * closes https://github.com/alcionai/corso/issues/4581 #### Test Plan <!-- How will this be tested prior to merging.--> - [ ] 💪 Manual - [x] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
e46cf645e5
commit
e2e2012220
@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased] (beta)
|
||||
|
||||
### Changed
|
||||
- Change file extension of messages export to json to match the content
|
||||
|
||||
## [v0.15.0] (beta) - 2023-10-31
|
||||
|
||||
### Added
|
||||
|
||||
@ -61,10 +61,12 @@ func streamItems(
|
||||
stats.UpdateResourceCount(path.ChannelMessagesCategory)
|
||||
body = data.ReaderWithStats(body, path.ChannelMessagesCategory, stats)
|
||||
|
||||
// messages are exported as json and should be named as such
|
||||
name := item.ID() + ".json"
|
||||
|
||||
ch <- export.Item{
|
||||
ID: item.ID(),
|
||||
// channel message items have no name
|
||||
Name: item.ID(),
|
||||
ID: item.ID(),
|
||||
Name: name,
|
||||
Body: body,
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ func (suite *ExportUnitSuite) TestStreamItems() {
|
||||
},
|
||||
},
|
||||
},
|
||||
expectName: "zim",
|
||||
expectName: "zim.json",
|
||||
expectErr: assert.NoError,
|
||||
},
|
||||
{
|
||||
@ -71,7 +71,7 @@ func (suite *ExportUnitSuite) TestStreamItems() {
|
||||
clues.New("I miss my cupcake."),
|
||||
},
|
||||
},
|
||||
expectName: "gir",
|
||||
expectName: "gir.json",
|
||||
expectErr: assert.Error,
|
||||
},
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ func (suite *ExportUnitSuite) TestExportRestoreCollections_messages() {
|
||||
expectedItems = []export.Item{
|
||||
{
|
||||
ID: itemID,
|
||||
Name: dii.Groups.ItemName,
|
||||
Name: dii.Groups.ItemName + ".json",
|
||||
// Body: body, not checked
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user