테스트: 실제 GitHub Release 로 업데이트 확인 · 받기 · 검증 (JJ_NET_TESTS=1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
old-history-local
RyuJongJin 2026-09-30 13:31:15 +09:00
parent cc6974fc30
commit b3bcbe30a3
1 changed files with 13 additions and 0 deletions

View File

@ -51,6 +51,19 @@ void main() {
}); });
}); });
test('실제 GitHub: v1.0.0 에서 최신 찾기 · 받기 · 검증 (JJ_NET_TESTS=1)', () async {
if (Platform.environment['JJ_NET_TESTS'] != '1') return markTestSkipped('인터넷 테스트 꺼짐');
final tmp = Directory.systemTemp.createTempSync('jj_real_upd_');
addTearDown(() => tmp.deleteSync(recursive: true));
final up = GitHubUpdater(appDir: tmp.path, versionOverride: '1.0.0');
final r = (await up.latest())!;
expect(r.isNewerThan('1.0.0'), isTrue);
expect(r.sha256, hasLength(64));
final dir = await up.download(r, (_) {});
expect(File(p.join(dir, 'jj_mkvmaker.exe')).existsSync(), isTrue);
expect(File(p.join(dir, 'ffmpeg', 'ffmpeg.exe')).existsSync(), isTrue);
}, timeout: const Timeout(Duration(minutes: 10)));
group('GitHubUpdater (가짜 GitHub 서버 · 실제 스크립트)', () { group('GitHubUpdater (가짜 GitHub 서버 · 실제 스크립트)', () {
late HttpServer server; late HttpServer server;
late Directory tmp; late Directory tmp;