Skip to content

Commit fa22f57

Browse files
dranuhlctron
authored andcommitted
Add integration test for ghost file entry handling.
1 parent 676736c commit fa22f57

File tree

2 files changed

+107
-0
lines changed

2 files changed

+107
-0
lines changed

src/it/test16-ghost/pom.xml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>de.dentrassi.maven.rpm.test</groupId>
7+
<artifactId>test16-ghost</artifactId>
8+
<version>1.0.0-SNAPSHOT</version>
9+
<packaging>jar</packaging>
10+
11+
<name>Test Package #16</name>
12+
<description>
13+
Test ghost file entry handling
14+
</description>
15+
16+
<url>http://dentrassi.de</url>
17+
18+
<organization>
19+
<name>Jens Reimann</name>
20+
<url>http://dentrassi.de</url>
21+
</organization>
22+
23+
<licenses>
24+
<license>
25+
<name>Eclipse Public License - v 1.0</name>
26+
<distribution>repo</distribution>
27+
<url>https://www.eclipse.org/legal/epl-v10.html</url>
28+
</license>
29+
</licenses>
30+
31+
<properties>
32+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
33+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
34+
<skipSigning>true</skipSigning>
35+
</properties>
36+
37+
<build>
38+
39+
<plugins>
40+
<plugin>
41+
<groupId>de.dentrassi.maven</groupId>
42+
<artifactId>rpm</artifactId>
43+
<version>@project.version@</version>
44+
<executions>
45+
<execution>
46+
<goals>
47+
<goal>rpm</goal>
48+
</goals>
49+
<configuration>
50+
<group>Application/Misc</group>
51+
52+
<outputFileName>test16.rpm</outputFileName>
53+
54+
<entries>
55+
<entry>
56+
<name>/tmp/ghost-file-entry</name>
57+
<ghost>true</ghost>
58+
<user>root</user>
59+
<group>root</group>
60+
<mode>0644</mode>
61+
</entry>
62+
</entries>
63+
64+
<signature>
65+
<keyId>${keyId}</keyId>
66+
<keyringFile>${user.home}/.gnupg/secring.gpg</keyringFile>
67+
<passphrase>${passphrase}</passphrase>
68+
<hashAlgorithm>SHA1</hashAlgorithm>
69+
<skip>${skipSigning}</skip>
70+
</signature>
71+
72+
</configuration>
73+
</execution>
74+
</executions>
75+
</plugin>
76+
</plugins>
77+
</build>
78+
79+
<profiles>
80+
<profile>
81+
<id>sign</id>
82+
<activation>
83+
<activeByDefault>false</activeByDefault>
84+
</activation>
85+
<properties>
86+
<skipSigning>false</skipSigning>
87+
</properties>
88+
</profile>
89+
</profiles>
90+
91+
</project>

src/it/test16-ghost/verify.groovy

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
def flags ( options ) {
3+
Process proc = ('rpm -l ' + options + ' -qp ' + basedir + "/target/test16.rpm").execute();
4+
return proc.in.getText().trim();
5+
}
6+
7+
def all_files = flags("");
8+
println "Suggests: " + all_files;
9+
10+
def noghost_files = flags("--noghost");
11+
println "Recommends: " + noghost_files;
12+
13+
return
14+
all_files == "./tmp/ghost-file-entry" &&
15+
noghost_files == ""
16+
;

0 commit comments

Comments
 (0)