feat(code_push_client): include artifact size (#177)
This commit is contained in:
@@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user