Skip to content

Commit

Permalink
adds export to fake job #2
Browse files Browse the repository at this point in the history
  • Loading branch information
louismrose committed Mar 19, 2024
1 parent d4ed70b commit 7915f81
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ the [Zamzar API documentation](https://developers.zamzar.com/docs).
By default, `zamzar-mock` will boot with the following example jobs:

* 1 - A successful conversion from `example.mp3` to `example.txt`
* 2 - A successful conversion from `example.key` to `example-*.png` (multiple output files)
* 2 - A successful conversion from `example.key` to `example-*.png` (multiple output files; with an export)
* 3 - A failed conversion from `example.doc` to `example.pdf`

### Test Imports
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/__files/jobs/2.cancelled.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"name": "example.key",
"size": 420568
},
"target_files": [],
"target_format": "png",
"credit_cost": 1
"export_url": "s3://example-bucket/thumbnails/",
"credit_cost": 1,
"target_files": []
}
27 changes: 25 additions & 2 deletions src/main/resources/__files/jobs/2.completed.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"name": "example.key",
"size": 420568
},
"target_format": "png",
"export_url": "s3://example-bucket/thumbnails/",
"credit_cost": 1,
"target_files": [
{
"id": 4,
Expand All @@ -28,6 +31,26 @@
"size": 74457
}
],
"target_format": "png",
"credit_cost": 1
"exports": [
{
"id": 1,
"url": "s3://example-bucket/thumbnails/example-0.png",
"status": "successful"
},
{
"id": 2,
"url": "s3://example-bucket/thumbnails/example-1.png",
"status": "successful"
},
{
"id": 3,
"url": "s3://example-bucket/thumbnails/example-2.png",
"status": "successful"
},
{
"id": 1,
"url": "s3://example-bucket/thumbnails/example.zip",
"status": "successful"
}
]
}
49 changes: 47 additions & 2 deletions src/main/resources/__files/jobs/2.converting.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,56 @@
{
"id": 2,
"status": "converting",
"status": "successful",
"source_file": {
"id": 3,
"name": "example.key",
"size": 420568
},
"target_format": "png",
"credit_cost": 1
"export_url": "s3://example-bucket/thumbnails/",
"credit_cost": 1,
"target_files": [
{
"id": 4,
"name": "example-0.png",
"size": 55342
},
{
"id": 5,
"name": "example-1.png",
"size": 57979
},
{
"id": 6,
"name": "example-2.png",
"size": 71021
},
{
"id": 7,
"name": "example.zip",
"size": 74457
}
],
"exports": [
{
"id": 1,
"url": "s3://example-bucket/thumbnails/example-0.png",
"status": "successful"
},
{
"id": 2,
"url": "s3://example-bucket/thumbnails/example-1.png",
"status": "successful"
},
{
"id": 3,
"url": "s3://example-bucket/thumbnails/example-2.png",
"status": "successful"
},
{
"id": 1,
"url": "s3://example-bucket/thumbnails/example.zip",
"status": "uploading"
}
]
}
1 change: 1 addition & 0 deletions src/main/resources/__files/jobs/2.initialising.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"size": 420568
},
"target_format": "png",
"export_url": "s3://example-bucket/thumbnails/",
"credit_cost": 1
}

0 comments on commit 7915f81

Please sign in to comment.