File tree 2 files changed +34
-0
lines changed
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test and Build
2
+
3
+ on : [pull_request]
4
+
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-18.04
8
+ steps :
9
+ - uses : actions/checkout@v3
10
+ - run : |
11
+ sudo apt update
12
+ sudo apt remove --yes libappindicator3-dev
13
+ sudo apt install --yes build-essential ruby ruby-dev rubygems libgtk-3-dev libayatana-appindicator3-dev
14
+ #sudo gem install --no-document fpm -v 1.13.1
15
+ - uses : actions/setup-go@v3
16
+ with :
17
+ go-version : ' ^1.19'
18
+ - name : Test and Build
19
+ run : |
20
+ make local
Original file line number Diff line number Diff line change @@ -557,5 +557,19 @@ func (gui *Gui) activateTenant(ctx context.Context, name string) {
557
557
_ , err := gui .DeviceAgentClient .SetActiveTenant (ctx , req )
558
558
if err != nil {
559
559
notify .Errorf ("Failed to activate tenant, err: %v" , err )
560
+ return
561
+ }
562
+
563
+ getConfigResponse , err := gui .DeviceAgentClient .GetAgentConfiguration (ctx , & pb.GetAgentConfigurationRequest {})
564
+ if err != nil {
565
+ log .Errorf ("Failed to get agent configuration, err: %v" , err )
566
+ return
567
+ }
568
+
569
+ if getConfigResponse .Config .AutoConnect {
570
+ _ , err = gui .DeviceAgentClient .Login (ctx , & pb.LoginRequest {})
571
+ if err != nil {
572
+ log .Errorf ("connect: %v" , err )
573
+ }
560
574
}
561
575
}
You can’t perform that action at this time.
0 commit comments