mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-27 11:14:59 +00:00
Merge pull request #434 from iflytek/worktree-fix-promotion-download
fix(promotion): copy bundleReady and downloadReady when promoting skill to global
This commit is contained in:
commit
356e507cf9
2 changed files with 6 additions and 0 deletions
|
|
@ -234,6 +234,8 @@ public class PromotionService {
|
|||
newVersion.setManifestJson(sourceVersion.getManifestJson());
|
||||
newVersion.setFileCount(sourceVersion.getFileCount());
|
||||
newVersion.setTotalSize(sourceVersion.getTotalSize());
|
||||
newVersion.setBundleReady(sourceVersion.isBundleReady());
|
||||
newVersion.setDownloadReady(sourceVersion.isDownloadReady());
|
||||
newVersion = skillVersionRepository.save(newVersion);
|
||||
|
||||
// Update skill's latest version
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ class PromotionServiceTest {
|
|||
sv.setManifestJson("{\"version\":\"1.0.0\"}");
|
||||
sv.setFileCount(3);
|
||||
sv.setTotalSize(1024L);
|
||||
sv.setBundleReady(true);
|
||||
sv.setDownloadReady(true);
|
||||
return sv;
|
||||
}
|
||||
|
||||
|
|
@ -466,6 +468,8 @@ class PromotionServiceTest {
|
|||
assertEquals(3, newVersion.getFileCount());
|
||||
assertEquals(1024L, newVersion.getTotalSize());
|
||||
assertEquals(Instant.now(CLOCK), newVersion.getPublishedAt());
|
||||
assertTrue(newVersion.isBundleReady());
|
||||
assertTrue(newVersion.isDownloadReady());
|
||||
|
||||
// Verify files copied
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue