test/systemd.unit.create: add new options to test
Add the new options to the b.json test and update the diff. The new file has the following contents: [Unit] Description=Create directory DefaultDependencies=False ConditionPathExists=|!/etc/myfile ConditionPathIsDirectory=|!/etc/mydir [Service] Type=oneshot RemainAfterExit=True ExecStart=mkdir -p /etc/mydir ExecStart=touch /etc/myfile Environment="DEBUG=1" EnvironmentFile=/etc/example.env [Install] WantedBy=local-fs.target RequiredBy=multi-user.target
This commit is contained in:
parent
c72f1bc54e
commit
80c84020dd
3 changed files with 33 additions and 1 deletions
|
|
@ -635,6 +635,15 @@
|
||||||
"ExecStart": [
|
"ExecStart": [
|
||||||
"mkdir -p /etc/mydir",
|
"mkdir -p /etc/mydir",
|
||||||
"touch /etc/myfile"
|
"touch /etc/myfile"
|
||||||
|
],
|
||||||
|
"Environment": [
|
||||||
|
{
|
||||||
|
"key": "DEBUG",
|
||||||
|
"value": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"EnvironmentFile": [
|
||||||
|
"/etc/example.env"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Install": {
|
"Install": {
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,11 @@ pipelines:
|
||||||
ExecStart:
|
ExecStart:
|
||||||
- mkdir -p /etc/mydir
|
- mkdir -p /etc/mydir
|
||||||
- touch /etc/myfile
|
- touch /etc/myfile
|
||||||
|
Environment:
|
||||||
|
- key: "DEBUG"
|
||||||
|
value: "1"
|
||||||
|
EnvironmentFile:
|
||||||
|
- "/etc/example.env"
|
||||||
Install:
|
Install:
|
||||||
WantedBy:
|
WantedBy:
|
||||||
- local-fs.target
|
- local-fs.target
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,28 @@
|
||||||
"added_files": [],
|
"added_files": [],
|
||||||
"deleted_files": [],
|
"deleted_files": [],
|
||||||
"differences": {
|
"differences": {
|
||||||
|
"/etc/pki/ca-trust/extracted/java/cacerts": {
|
||||||
|
"content": [
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
"/etc/systemd/user/create-directory.service": {
|
"/etc/systemd/user/create-directory.service": {
|
||||||
"content": [
|
"content": [
|
||||||
"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||||
"sha256:b6ea3cdc2ca7cd0a3c623869003cc4c68c17ccaa8eacacb17af34c3df05f89d4"
|
"sha256:69aa663d58cc063ea2d7659ac06354335c26e69e8fdb0036f952b082a70b5642"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/usr/lib/sysimage/rpm/rpmdb.sqlite": {
|
||||||
|
"content": [
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/var/cache/ldconfig/aux-cache": {
|
||||||
|
"content": [
|
||||||
|
null,
|
||||||
|
null
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue