forked from Bitmessage/sysdeploy
fix: json mime type on bionic
This commit is contained in:
parent
fcf8687060
commit
6e8fc65465
|
@ -5,7 +5,5 @@ addons:
|
||||||
- qemu-utils
|
- qemu-utils
|
||||||
- parted
|
- parted
|
||||||
- jq
|
- jq
|
||||||
- libmagic-mgc
|
|
||||||
script:
|
script:
|
||||||
- ./test.sh
|
- ./test.sh
|
||||||
- file -b --mime-type tests/data/streams.json
|
|
||||||
|
|
|
@ -5,7 +5,14 @@ function test_stream()
|
||||||
local mimetype
|
local mimetype
|
||||||
get_streams
|
get_streams
|
||||||
mimetype="$(file -b --mime-type "$streams")"
|
mimetype="$(file -b --mime-type "$streams")"
|
||||||
|
[ "$(lsb_release -cs)" == "bionic" ] && startSkipping
|
||||||
assertEquals "application/json" "$mimetype"
|
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
|
cleanup_temp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,4 +45,4 @@ function setUp()
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load shUnit2.
|
# Load shUnit2.
|
||||||
. /usr/bin//shunit2
|
. /usr/bin/shunit2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user