fix: json mime type on bionic

This commit is contained in:
Peter Šurda 2021-02-26 22:10:58 +01:00
parent fcf8687060
commit 6e8fc65465
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
2 changed files with 8 additions and 3 deletions

View File

@ -5,7 +5,5 @@ addons:
- qemu-utils
- parted
- jq
- libmagic-mgc
script:
- ./test.sh
- file -b --mime-type tests/data/streams.json

View File

@ -5,7 +5,14 @@ function test_stream()
local mimetype
get_streams
mimetype="$(file -b --mime-type "$streams")"
[ "$(lsb_release -cs)" == "bionic" ] && startSkipping
assertEquals "application/json" "$mimetype"
isSkipping && endSkipping
[ "$(lsb_release -cs)" == "focal" ] && startSkipping
assertEquals "text/plain" "$mimetype"
isSkipping && endSkipping
jq . "$streams" &> /dev/null
assertEquals 0 "$?"
cleanup_temp
}
@ -38,4 +45,4 @@ function setUp()
}
# Load shUnit2.
. /usr/bin//shunit2
. /usr/bin/shunit2