Skip to content

Commit

Permalink
Merge pull request #2516 from reubenmiller/issue-2448
Browse files Browse the repository at this point in the history
feat: run initializations before starting main process
  • Loading branch information
reubenmiller authored Dec 14, 2023
2 parents b4974b9 + 18d6e45 commit e0a6927
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions configuration/init/systemd/c8y-firmware-plugin.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ After=syslog.target network.target mosquitto.service

[Service]
User=tedge
ExecStartPre=+-/usr/bin/tedge init
ExecStart=/usr/bin/c8y-firmware-plugin
Restart=on-failure
RestartPreventExitStatus=255
Expand Down
1 change: 1 addition & 0 deletions configuration/init/systemd/tedge-agent.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ After=syslog.target network.target mosquitto.service
[Service]
User=tedge
RuntimeDirectory=tedge-agent
ExecStartPre=+-/usr/bin/tedge init
ExecStart=/usr/bin/tedge-agent
Restart=on-failure
RestartPreventExitStatus=255
Expand Down
1 change: 1 addition & 0 deletions configuration/init/systemd/tedge-mapper-aws.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ After=syslog.target network.target mosquitto.service

[Service]
User=tedge
ExecStartPre=+-/usr/bin/tedge init
ExecStart=/usr/bin/tedge-mapper aws
Restart=on-failure
RestartPreventExitStatus=255
Expand Down
1 change: 1 addition & 0 deletions configuration/init/systemd/tedge-mapper-az.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ After=syslog.target network.target mosquitto.service

[Service]
User=tedge
ExecStartPre=+-/usr/bin/tedge init
ExecStart=/usr/bin/tedge-mapper az
Restart=on-failure
RestartPreventExitStatus=255
Expand Down
1 change: 1 addition & 0 deletions configuration/init/systemd/tedge-mapper-c8y.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ After=syslog.target network.target mosquitto.service

[Service]
User=tedge
ExecStartPre=+-/usr/bin/tedge init
ExecStart=/usr/bin/tedge-mapper c8y
Restart=on-failure
RestartPreventExitStatus=255
Expand Down
1 change: 1 addition & 0 deletions configuration/init/systemd/tedge-mapper-collectd.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ After=syslog.target network.target mosquitto.service

[Service]
User=tedge
ExecStartPre=+-/usr/bin/tedge init
ExecStart=/usr/bin/tedge-mapper collectd
Restart=on-failure
RestartPreventExitStatus=255
Expand Down
1 change: 1 addition & 0 deletions configuration/init/systemd/tedge-watchdog.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ StartLimitIntervalSec=0

[Service]
Type=notify
ExecStartPre=-/usr/bin/tedge init
ExecStart=/usr/bin/tedge-watchdog
Restart=on-failure
WatchdogSec=30
Expand Down
2 changes: 0 additions & 2 deletions tests/RobotFramework/tests/customizing/data_path_config.robot
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ Custom Setup
${PARENT_SN}= Setup
Set Suite Variable $PARENT_SN
Set Suite Variable $CHILD_SN ${PARENT_SN}_child
Execute Command sudo mkdir /var/test
Execute Command sudo chown tedge:tedge /var/test
Execute Command sudo tedge config set data.path /var/test

Custom Teardown
Expand Down
2 changes: 0 additions & 2 deletions tests/RobotFramework/tests/customizing/log_path_config.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Validate updated log path used by tedge-agent
*** Keywords ***
Custom Setup
Setup
Execute Command sudo mkdir /var/test
Execute Command sudo chown tedge:tedge /var/test

Custom Teardown
Execute Command sudo tedge config unset logs.path
Expand Down

1 comment on commit e0a6927

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
370 0 3 370 100 51m40.349s

Please sign in to comment.