feat(code_push_client): include artifact size (#177)

This commit is contained in:
Felix Angelov
2023-03-27 12:52:01 -05:00
committed by GitHub
parent 895b9f385b
commit 3eb24701b1
3 changed files with 4 additions and 0 deletions
@@ -39,6 +39,7 @@ void main() {
arch: 'aarch64',
platform: 'android',
hash: '#',
size: 42,
url: 'https://example.com',
);
const release = Release(
@@ -65,6 +65,7 @@ class CodePushClient {
'arch': arch,
'platform': platform,
'hash': hash,
'size': '${file.length}',
});
request.headers.addAll(_apiKeyHeader);
final response = await _httpClient.send(request);
@@ -61,6 +61,7 @@ void main() {
const arch = 'aarch64';
const platform = 'android';
const hash = 'test-hash';
const size = 42;
test('throws an exception if the http request fails (unknown)', () async {
when(() => httpClient.send(any())).thenAnswer((_) async {
@@ -137,6 +138,7 @@ void main() {
arch: arch,
platform: platform,
hash: hash,
size: size,
),
),
),