Unit tests for the DownloadUpdateTask class
This commit is contained in:
43
tests/data/1.json
Normal file
43
tests/data/1.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"ApiVersion": 0,
|
||||
"Id": 1,
|
||||
"Name": "1.0.1",
|
||||
"Files": [
|
||||
{
|
||||
"Path": "fileOne",
|
||||
"Sources": [
|
||||
{
|
||||
"SourceType": "http",
|
||||
"Url": "file://$PWD/tests/data/fileOneA"
|
||||
}
|
||||
],
|
||||
"Executable": true,
|
||||
"Perms": 493,
|
||||
"MD5": "9eb84090956c484e32cb6c08455a667b"
|
||||
},
|
||||
{
|
||||
"Path": "fileTwo",
|
||||
"Sources": [
|
||||
{
|
||||
"SourceType": "http",
|
||||
"Url": "file://$PWD/tests/data/fileTwo"
|
||||
}
|
||||
],
|
||||
"Executable": false,
|
||||
"Perms": 644,
|
||||
"MD5": "38f94f54fa3eb72b0ea836538c10b043"
|
||||
},
|
||||
{
|
||||
"Path": "fileThree",
|
||||
"Sources": [
|
||||
{
|
||||
"SourceType": "http",
|
||||
"Url": "file://$PWD/tests/data/fileThree"
|
||||
}
|
||||
],
|
||||
"Executable": false,
|
||||
"Perms": "750",
|
||||
"MD5": "f12df554b21e320be6471d7154130e70"
|
||||
}
|
||||
]
|
||||
}
|
31
tests/data/2.json
Normal file
31
tests/data/2.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"ApiVersion": 0,
|
||||
"Id": 1,
|
||||
"Name": "1.0.1",
|
||||
"Files": [
|
||||
{
|
||||
"Path": "fileOne",
|
||||
"Sources": [
|
||||
{
|
||||
"SourceType": "http",
|
||||
"Url": "file://$PWD/tests/data/fileOneB"
|
||||
}
|
||||
],
|
||||
"Executable": true,
|
||||
"Perms": 493,
|
||||
"MD5": "42915a71277c9016668cce7b82c6b577"
|
||||
},
|
||||
{
|
||||
"Path": "fileTwo",
|
||||
"Sources": [
|
||||
{
|
||||
"SourceType": "http",
|
||||
"Url": "file://$PWD/tests/data/fileTwo"
|
||||
}
|
||||
],
|
||||
"Executable": false,
|
||||
"Perms": 644,
|
||||
"MD5": "38f94f54fa3eb72b0ea836538c10b043"
|
||||
}
|
||||
]
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
"id": "develop",
|
||||
"name": "Develop",
|
||||
"description": "The channel called \"develop\"",
|
||||
"url": "http://example.org/stuff"
|
||||
"url": "file://$PWD/tests/data/"
|
||||
},
|
||||
{
|
||||
"id": "stable",
|
||||
|
1
tests/data/fileOneA
Normal file
1
tests/data/fileOneA
Normal file
@ -0,0 +1 @@
|
||||
stuff
|
3
tests/data/fileOneB
Normal file
3
tests/data/fileOneB
Normal file
@ -0,0 +1,3 @@
|
||||
stuff
|
||||
|
||||
more stuff that came in the new version
|
1
tests/data/fileThree
Normal file
1
tests/data/fileThree
Normal file
@ -0,0 +1 @@
|
||||
this is yet another file
|
1
tests/data/fileTwo
Normal file
1
tests/data/fileTwo
Normal file
@ -0,0 +1 @@
|
||||
some other stuff
|
@ -0,0 +1,17 @@
|
||||
<update version="3">
|
||||
<install>
|
||||
<file>
|
||||
<source>sourceOne</source>
|
||||
<dest>destOne</dest>
|
||||
<mode>0777</mode>
|
||||
</file>
|
||||
<file>
|
||||
<source>MultiMC.exe</source>
|
||||
<dest>M/u/l/t/i/M/C/e/x/e</dest>
|
||||
<mode>0644</mode>
|
||||
</file>
|
||||
</install>
|
||||
<uninstall>
|
||||
<file>toDelete.abc</file>
|
||||
</uninstall>
|
||||
</update>
|
Reference in New Issue
Block a user