Make file identity and loopback fixtures portable to Windows
Gitea CI / Windows x64 and Android (pull_request) Canceled after 0s
Gitea CI / Gitea CI passed (pull_request) Canceled after 0s

This commit is contained in:
lingjhf committed 2026-10-06 03:10:10 +08:00
1 parent 0f6097f58f
commit d20ce064a5
5 files changed
+7 -5

No files matched your search

+2 -1
View File
@@ -1054,7 +1054,8 @@ class _FixtureProjects extends Projects {
id: 'media',
name: 'Photo',
storage: AssetStorage.external,
location: 'file:///test/photo.png',
location: const ExternalMediaFile(path: '/test/photo.png').sourceUri
.toString(),
metadata: {'kind': 'image'},
),
],
+2 -1
View File
@@ -47,7 +47,8 @@ class _AttachmentProjects extends Projects {
id: 'asset-1',
name: '片段.mov',
storage: AssetStorage.external,
location: Uri.file('/tmp/片段.mov').toString(),
location: const ExternalMediaFile(path: '/tmp/片段.mov').sourceUri
.toString(),
metadata: const {'kind': 'file'},
),
],
@@ -41,7 +41,7 @@ void main() {
artifacts: [
ProcessingResourceArtifact(
path: 'model.onnx',
url: Uri.parse('http://localhost:${server.port}/model'),
url: Uri.parse('http://127.0.0.1:${server.port}/model'),
sha256: sha256.convert(payload).toString(),
bytes: payload.length,
),
+1 -1
View File
@@ -793,7 +793,7 @@ class _Projects extends Projects {
id: file.localPath!,
name: file.localPath!.split('/').last,
storage: AssetStorage.external,
location: Uri.file(file.localPath!).toString(),
location: file.sourceUri.toString(),
metadata: {'kind': mediaKindForPath(file.localPath!)},
),
];
@@ -19,7 +19,7 @@ AssetDocument _asset(String id, String path) => AssetDocument(
id: id,
name: id,
storage: AssetStorage.external,
location: Uri.file(path).toString(),
location: ExternalMediaFile(path: path).sourceUri.toString(),
);
class _Projects extends Projects {