Make file identity and loopback fixtures portable to Windows
This commit is contained in:
1 parent
0f6097f58f
commit
d20ce064a5
5 files changed
+7
-5
No files matched your search
@@ -1054,7 +1054,8 @@ class _FixtureProjects extends Projects {
|
|||||||
id: 'media',
|
id: 'media',
|
||||||
name: 'Photo',
|
name: 'Photo',
|
||||||
storage: AssetStorage.external,
|
storage: AssetStorage.external,
|
||||||
location: 'file:///test/photo.png',
|
location: const ExternalMediaFile(path: '/test/photo.png').sourceUri
|
||||||
|
.toString(),
|
||||||
metadata: {'kind': 'image'},
|
metadata: {'kind': 'image'},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ class _AttachmentProjects extends Projects {
|
|||||||
id: 'asset-1',
|
id: 'asset-1',
|
||||||
name: '片段.mov',
|
name: '片段.mov',
|
||||||
storage: AssetStorage.external,
|
storage: AssetStorage.external,
|
||||||
location: Uri.file('/tmp/片段.mov').toString(),
|
location: const ExternalMediaFile(path: '/tmp/片段.mov').sourceUri
|
||||||
|
.toString(),
|
||||||
metadata: const {'kind': 'file'},
|
metadata: const {'kind': 'file'},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ void main() {
|
|||||||
artifacts: [
|
artifacts: [
|
||||||
ProcessingResourceArtifact(
|
ProcessingResourceArtifact(
|
||||||
path: 'model.onnx',
|
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(),
|
sha256: sha256.convert(payload).toString(),
|
||||||
bytes: payload.length,
|
bytes: payload.length,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -793,7 +793,7 @@ class _Projects extends Projects {
|
|||||||
id: file.localPath!,
|
id: file.localPath!,
|
||||||
name: file.localPath!.split('/').last,
|
name: file.localPath!.split('/').last,
|
||||||
storage: AssetStorage.external,
|
storage: AssetStorage.external,
|
||||||
location: Uri.file(file.localPath!).toString(),
|
location: file.sourceUri.toString(),
|
||||||
metadata: {'kind': mediaKindForPath(file.localPath!)},
|
metadata: {'kind': mediaKindForPath(file.localPath!)},
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ AssetDocument _asset(String id, String path) => AssetDocument(
|
|||||||
id: id,
|
id: id,
|
||||||
name: id,
|
name: id,
|
||||||
storage: AssetStorage.external,
|
storage: AssetStorage.external,
|
||||||
location: Uri.file(path).toString(),
|
location: ExternalMediaFile(path: path).sourceUri.toString(),
|
||||||
);
|
);
|
||||||
|
|
||||||
class _Projects extends Projects {
|
class _Projects extends Projects {
|
||||||
|
|||||||
Reference in new issue
Block a user