-
Notifications
You must be signed in to change notification settings - Fork 48
/
log_test.txt
34 lines (27 loc) · 1.24 KB
/
log_test.txt
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
{{$test1 := "test eden.lim.test -test.v -timewait 10m -test.run TestLog"}}
# save the current config before changing it
eden -t 1m controller edge-node get-config --file /tmp/full-config.json
# set the remote log level to info, because the expected message is logged with info level
eden -t 1m controller edge-node update --config agent.debug.debug.loglevel=info
eden -t 1m controller edge-node update --config agent.debug.debug.remote.loglevel=info
# wait for the config changes to apply
exec sleep 15
# ssh into EVE to force log creation
exec -t 5m bash ssh.sh &
# Trying to find messages about ssh in log
{{$test1}} -out content 'content:.*Disconnected.*'
stdout 'Disconnected from'
# restore the original config
eden -t 1m controller edge-node set-config --file /tmp/full-config.json
# Test's config. file
-- eden-config.yml --
test:
controller: adam://{{EdenConfig "adam.ip"}}:{{EdenConfig "adam.port"}}
eve:
{{EdenConfig "eve.name"}}:
onboard-cert: {{EdenConfigPath "eve.cert"}}
serial: "{{EdenConfig "eve.serial"}}"
model: {{EdenConfig "eve.devmodel"}}
-- ssh.sh --
EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}}
until timeout 10 $EDEN eve ssh exit; do sleep 10; done