• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / mender / 1022753986

02 Oct 2023 10:37AM UTC coverage: 78.168% (-2.0%) from 80.127%
1022753986

push

gitlab-ci

oleorhagen
feat: Run the authentication loop once upon bootstrap

Ticket: MEN-6658
Changelog: None

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>

32 of 32 new or added lines in 1 file covered. (100.0%)

6996 of 8950 relevant lines covered (78.17%)

10353.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/common/dbus/dbus.cpp
1
// Copyright 2023 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14

15
#include <common/dbus.hpp>
16

17
#include <string>
18

19
namespace mender {
20
namespace common {
21
namespace dbus {
22

23
using namespace std;
24

25
const DBusErrorCategoryClass DBusErrorCategory;
26

27
const char *DBusErrorCategoryClass::name() const noexcept {
×
28
        return "DBusErrorCategory";
×
29
}
30

31
string DBusErrorCategoryClass::message(int code) const {
1✔
32
        switch (code) {
1✔
33
        case NoError:
×
34
                return "Success";
×
35
        case ConnectionError:
×
36
                return "DBus connection error";
×
37
        case MessageError:
×
38
                return "DBus message error";
×
39
        case ReplyError:
1✔
40
                return "DBus reply error";
1✔
41
        case ValueError:
×
42
                return "DBus value error";
×
43
        default:
×
44
                return "Unknown DBus error";
×
45
        }
46
}
47

48
error::Error MakeError(DBusErrorCode code, const string &msg) {
1✔
49
        return error::Error(error_condition(code, DBusErrorCategory), msg);
2✔
50
}
51

52
} // namespace dbus
53
} // namespace common
54
} // namespace mender
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc