maven/image import tests from first branch
This commit is contained in:
parent
bdf04adb23
commit
3a638314d8
23 changed files with 750 additions and 0 deletions
51
tests/test_hub/data/image/import_1/data.json
Normal file
51
tests/test_hub/data/image/import_1/data.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"x86_64": {
|
||||
"files": [
|
||||
"tdl-x86_64.xml",
|
||||
"image.ks",
|
||||
"image-base.ks",
|
||||
"foo-x86_64.xml",
|
||||
"my-image-7.4.2-2.x86_64.ova"
|
||||
],
|
||||
"rpmlist": [
|
||||
{
|
||||
"name": "some-package",
|
||||
"buildtime": 1421172150,
|
||||
"epoch": null,
|
||||
"version": "1.0",
|
||||
"release": "8.el7",
|
||||
"arch": "x86_64",
|
||||
"payloadhash": "28f1f3e6194573da1069bc82acdb79bd",
|
||||
"size": 638
|
||||
},
|
||||
{
|
||||
"name": "another-package",
|
||||
"buildtime": 1462364954,
|
||||
"epoch": null,
|
||||
"version": "2.8.71",
|
||||
"release": "7.el7",
|
||||
"arch": "noarch",
|
||||
"payloadhash": "0a445b4440665e1b435ed08b792f4811",
|
||||
"size": 696715
|
||||
},
|
||||
{
|
||||
"name": "yet-another-package",
|
||||
"buildtime": 1435146325,
|
||||
"epoch": null,
|
||||
"version": "2.6.0",
|
||||
"release": "1.el7_1",
|
||||
"arch": "noarch",
|
||||
"payloadhash": "ca7829d6a999db3835ab50902e44ce05",
|
||||
"size": 350906
|
||||
}
|
||||
],
|
||||
"logs": [
|
||||
"oz-x86_64.log"
|
||||
],
|
||||
"task_id": 999,
|
||||
"version": "7.4.2",
|
||||
"release": "2",
|
||||
"arch": "x86_64",
|
||||
"name": "my-image"
|
||||
}
|
||||
}
|
||||
144
tests/test_hub/data/image/import_1/db.json
Normal file
144
tests/test_hub/data/image/import_1/db.json
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
{
|
||||
"inserts": [
|
||||
[
|
||||
"INSERT INTO archiveinfo (build_id, archive_id, type_id, checksum, filename, checksum_type, btype_id, buildroot_id, id, size) VALUES (%(build_id)s, %(archive_id)s, %(type_id)s, %(checksum)s, %(filename)s, %(checksum_type)s, %(btype_id)s, %(buildroot_id)s, %(id)s, %(size)s)",
|
||||
{
|
||||
"build_id": 137,
|
||||
"archive_id": "ARCHIVE_ID",
|
||||
"type_id": "ARCHIVETYPE",
|
||||
"checksum": "19a674d997af7098a444b60d7b51cee6",
|
||||
"filename": "tdl-x86_64.xml",
|
||||
"checksum_type": 0,
|
||||
"btype_id": "BTYPEID:image",
|
||||
"buildroot_id": null,
|
||||
"id": 1001,
|
||||
"size": 36
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO image_archives (archive_id, arch) VALUES (%(archive_id)s, %(arch)s)",
|
||||
{
|
||||
"archive_id": 1001,
|
||||
"arch": "x86_64"
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO archiveinfo (build_id, archive_id, type_id, checksum, filename, checksum_type, btype_id, buildroot_id, id, size) VALUES (%(build_id)s, %(archive_id)s, %(type_id)s, %(checksum)s, %(filename)s, %(checksum_type)s, %(btype_id)s, %(buildroot_id)s, %(id)s, %(size)s)",
|
||||
{
|
||||
"build_id": 137,
|
||||
"archive_id": "ARCHIVE_ID",
|
||||
"type_id": "ARCHIVETYPE",
|
||||
"checksum": "a5114a20d790cf17eca1b1115a4546f8",
|
||||
"filename": "image.ks",
|
||||
"checksum_type": 0,
|
||||
"btype_id": "BTYPEID:image",
|
||||
"buildroot_id": null,
|
||||
"id": 1002,
|
||||
"size": 30
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO image_archives (archive_id, arch) VALUES (%(archive_id)s, %(arch)s)",
|
||||
{
|
||||
"archive_id": 1002,
|
||||
"arch": "x86_64"
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO archiveinfo (build_id, archive_id, type_id, checksum, filename, checksum_type, btype_id, buildroot_id, id, size) VALUES (%(build_id)s, %(archive_id)s, %(type_id)s, %(checksum)s, %(filename)s, %(checksum_type)s, %(btype_id)s, %(buildroot_id)s, %(id)s, %(size)s)",
|
||||
{
|
||||
"build_id": 137,
|
||||
"archive_id": "ARCHIVE_ID",
|
||||
"type_id": "ARCHIVETYPE",
|
||||
"checksum": "9828cf75d9d17ac8e79e53ed71c6a71c",
|
||||
"filename": "image-base.ks",
|
||||
"checksum_type": 0,
|
||||
"btype_id": "BTYPEID:image",
|
||||
"buildroot_id": null,
|
||||
"id": 1003,
|
||||
"size": 35
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO image_archives (archive_id, arch) VALUES (%(archive_id)s, %(arch)s)",
|
||||
{
|
||||
"archive_id": 1003,
|
||||
"arch": "x86_64"
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO archiveinfo (build_id, archive_id, type_id, checksum, filename, checksum_type, btype_id, buildroot_id, id, size) VALUES (%(build_id)s, %(archive_id)s, %(type_id)s, %(checksum)s, %(filename)s, %(checksum_type)s, %(btype_id)s, %(buildroot_id)s, %(id)s, %(size)s)",
|
||||
{
|
||||
"build_id": 137,
|
||||
"archive_id": "ARCHIVE_ID",
|
||||
"type_id": "ARCHIVETYPE",
|
||||
"checksum": "f601c0f647d7cdd4c92aa511876f8533",
|
||||
"filename": "foo-x86_64.xml",
|
||||
"checksum_type": 0,
|
||||
"btype_id": "BTYPEID:image",
|
||||
"buildroot_id": null,
|
||||
"id": 1004,
|
||||
"size": 36
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO image_archives (archive_id, arch) VALUES (%(archive_id)s, %(arch)s)",
|
||||
{
|
||||
"archive_id": 1004,
|
||||
"arch": "x86_64"
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO archiveinfo (build_id, archive_id, type_id, checksum, filename, checksum_type, btype_id, buildroot_id, id, size) VALUES (%(build_id)s, %(archive_id)s, %(type_id)s, %(checksum)s, %(filename)s, %(checksum_type)s, %(btype_id)s, %(buildroot_id)s, %(id)s, %(size)s)",
|
||||
{
|
||||
"build_id": 137,
|
||||
"archive_id": "ARCHIVE_ID",
|
||||
"type_id": "ARCHIVETYPE",
|
||||
"checksum": "84547200ef5002292ecdd50c62de518e",
|
||||
"filename": "my-image-7.4.2-2.x86_64.ova",
|
||||
"checksum_type": 0,
|
||||
"btype_id": "BTYPEID:image",
|
||||
"buildroot_id": null,
|
||||
"id": 1005,
|
||||
"size": 49
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO image_archives (archive_id, arch) VALUES (%(archive_id)s, %(arch)s)",
|
||||
{
|
||||
"archive_id": 1005,
|
||||
"arch": "x86_64"
|
||||
},
|
||||
{}
|
||||
],
|
||||
[
|
||||
"INSERT INTO archive_rpm_components (archive_id, rpm_id) VALUES (%(archive_id)s, %(rpm_id)s)",
|
||||
{
|
||||
"archive_id": 1005,
|
||||
"rpm_id": 1002
|
||||
},
|
||||
{}
|
||||
]
|
||||
],
|
||||
"updates": [
|
||||
[
|
||||
"UPDATE build SET state = %(data.state)s, id = %(data.id)s, completion_time = (now())\nWHERE ( id=%(build_id)i )",
|
||||
{
|
||||
"state": 1,
|
||||
"id": "BUILD_ID"
|
||||
},
|
||||
{
|
||||
"completion_time": "now()"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
1
tests/test_hub/data/maven/import_1/build.log
Normal file
1
tests/test_hub/data/maven/import_1/build.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
This is build.log
|
||||
1
tests/test_hub/data/maven/import_1/checkout.log
Normal file
1
tests/test_hub/data/maven/import_1/checkout.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
This is checkout.log
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata modelVersion="1.1.0">
|
||||
<groupId>com.mycompany.app</groupId>
|
||||
<artifactId>my-app</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<versioning>
|
||||
<snapshot>
|
||||
<timestamp>20170927.043542</timestamp>
|
||||
<buildNumber>1</buildNumber>
|
||||
</snapshot>
|
||||
<lastUpdated>20170927043542</lastUpdated>
|
||||
<snapshotVersions>
|
||||
<snapshotVersion>
|
||||
<extension>jar</extension>
|
||||
<value>1.0-20170927.043542-1</value>
|
||||
<updated>20170927043542</updated>
|
||||
</snapshotVersion>
|
||||
<snapshotVersion>
|
||||
<extension>pom</extension>
|
||||
<value>1.0-20170927.043542-1</value>
|
||||
<updated>20170927043542</updated>
|
||||
</snapshotVersion>
|
||||
</snapshotVersions>
|
||||
</versioning>
|
||||
</metadata>
|
||||
|
|
@ -0,0 +1 @@
|
|||
3a7199598278308bc0dace024e5ad231
|
||||
|
|
@ -0,0 +1 @@
|
|||
5703d4c0b313fa8580000f49d3c2d54018dbabd3
|
||||
Binary file not shown.
|
|
@ -0,0 +1 @@
|
|||
1bd36fe06d1a9ee0eb1772469e922ba1
|
||||
|
|
@ -0,0 +1 @@
|
|||
66c246f8602ff2087a90196ee463ff3721305aac
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.mycompany.app</groupId>
|
||||
<artifactId>my-app</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>my-app</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1 @@
|
|||
eaa80817dcfdaab0114174a1b6a5a610
|
||||
|
|
@ -0,0 +1 @@
|
|||
c75e355eb8a46076a680dcf050dde848e55b6d4d
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.mycompany.app</groupId>
|
||||
<artifactId>my-app</artifactId>
|
||||
<versioning>
|
||||
<versions>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</versions>
|
||||
<lastUpdated>20170927043542</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
||||
|
|
@ -0,0 +1 @@
|
|||
c5e046db861fb27a0a008b931b2381c4
|
||||
|
|
@ -0,0 +1 @@
|
|||
4ed2391cce9de027b1b24ddc572feb198df7b9a3
|
||||
35
tests/test_hub/data/maven/import_1/data.json
Normal file
35
tests/test_hub/data/maven/import_1/data.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"files": {
|
||||
"": [
|
||||
"my-app-1.0-SNAPSHOT-scm-sources.zip"
|
||||
],
|
||||
"com/mycompany/app/my-app": [
|
||||
"maven-metadata.xml.md5",
|
||||
"maven-metadata.xml.sha1",
|
||||
"maven-metadata.xml"
|
||||
],
|
||||
"com/mycompany/app/my-app/1.0-SNAPSHOT": [
|
||||
"my-app-1.0-20170927.043542-1.pom.md5",
|
||||
"maven-metadata.xml.md5",
|
||||
"my-app-1.0-20170927.043542-1.pom.sha1",
|
||||
"maven-metadata.xml.sha1",
|
||||
"my-app-1.0-20170927.043542-1.jar.sha1",
|
||||
"maven-metadata.xml",
|
||||
"my-app-1.0-20170927.043542-1.jar",
|
||||
"my-app-1.0-20170927.043542-1.pom",
|
||||
"my-app-1.0-20170927.043542-1.jar.md5"
|
||||
]
|
||||
},
|
||||
"buildroot_id": 3492408,
|
||||
"logs": [
|
||||
"checkout.log",
|
||||
"state.log",
|
||||
"build.log",
|
||||
"root.log"
|
||||
],
|
||||
"maven_info": {
|
||||
"group_id": "com.mycompany.app",
|
||||
"artifact_id": "my-app",
|
||||
"version": "1.0-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
20
tests/test_hub/data/maven/import_1/files
Normal file
20
tests/test_hub/data/maven/import_1/files
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/data/logs/maven/root.log
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/data/logs/maven/build.log
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/data/logs/maven/state.log
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/data/logs/maven/checkout.log
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/maven-metadata.xml.sha1
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/maven-metadata.xml.md5
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/maven-metadata.xml
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-20170927.043542-1.pom.sha1
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-20170927.043542-1.pom.md5
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-20170927.043542-1.pom
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-20170927.043542-1.jar.sha1
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-20170927.043542-1.jar.md5
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-20170927.043542-1.jar
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/maven-metadata.xml.sha1
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/maven-metadata.xml.md5
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/maven-metadata.xml
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-SNAPSHOT-scm-sources.zip.sha1
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-SNAPSHOT-scm-sources.zip.md5
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/maven/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-SNAPSHOT-scm-sources.zip
|
||||
packages/com.mycompany.app-my-app/1.0_SNAPSHOT/1/metadata.json
|
||||
Binary file not shown.
1
tests/test_hub/data/maven/import_1/root.log
Normal file
1
tests/test_hub/data/maven/import_1/root.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
This is root.log
|
||||
1
tests/test_hub/data/maven/import_1/state.log
Normal file
1
tests/test_hub/data/maven/import_1/state.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
This is state.log
|
||||
Loading…
Add table
Add a link
Reference in a new issue