-
Notifications
You must be signed in to change notification settings - Fork 13
/
symlink.go
49 lines (45 loc) · 1.24 KB
/
symlink.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright The Mantle Authors
// Copyright 2020 Red Hat
// SPDX-License-Identifier: Apache-2.0
package ignition
import (
"github.com/coreos/go-semver/semver"
"github.com/flatcar/mantle/kola/cluster"
"github.com/flatcar/mantle/kola/register"
"github.com/flatcar/mantle/platform/conf"
)
func init() {
register.Register(®ister.Test{
Name: "cl.ignition.symlink",
Run: writeAbsoluteSymlink,
ClusterSize: 1,
// This test is normally not related to the cloud environment
Platforms: []string{"qemu", "qemu-unpriv"},
UserData: conf.Ignition(`{
"ignition": {
"version": "3.0.0"
},
"storage": {
"links": [
{
"group": {
"name": "core"
},
"overwrite": true,
"path": "/etc/localtime",
"user": {
"name": "core"
},
"hard": false,
"target": "/usr/share/zoneinfo/Europe/Zurich"
}
]
}
}`),
MinVersion: semver.Version{Major: 3185},
})
}
func writeAbsoluteSymlink(c cluster.TestCluster) {
m := c.Machines()[0]
c.AssertCmdOutputContains(m, "readlink /etc/localtime", "/usr/share/zoneinfo/Europe/Zurich")
}