feat: implement service events

This implements service events, adds test for events API based on
service events as they're the easiest to generate on demand.

Disabled validate test for 'metal' as it validates disk device against
local system which doesn't make much sense.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This commit is contained in:
Andrey Smirnov
2020-07-03 00:43:59 +03:00
committed by talos-bot
parent 0cd86f17c3
commit a6b3bd2ff6
9 changed files with 958 additions and 657 deletions

View File

@@ -7,6 +7,7 @@
package cli
import (
"fmt"
"io/ioutil"
"os"
@@ -47,8 +48,10 @@ func (suite *ValidateSuite) TestValidate() {
suite.RunCLI([]string{"gen", "config", "foobar", "https://10.0.0.1"})
for _, configFile := range []string{"init.yaml", "controlplane.yaml", "join.yaml"} {
for _, mode := range []string{"cloud", "container", "metal"} {
suite.RunCLI([]string{"validate", "-m", mode, "-c", configFile})
for _, mode := range []string{"cloud", "container"} {
suite.Run(fmt.Sprintf("%s-%s", configFile, mode), func() {
suite.RunCLI([]string{"validate", "-m", mode, "-c", configFile})
})
}
}
}