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

mendersoftware / mender / 2281564137

23 Jan 2026 10:59AM UTC coverage: 81.48% (+1.7%) from 79.764%
2281564137

push

gitlab-ci

michalkopczan
fix: Schedule next deployment poll if current one failed early causing no handler to be called

Ticket: MEN-9144
Changelog: Fix a hang when polling for deployment failed early causing no handler of API response
to be called. Added handler call for this case, causing the deployment polling
to continue.

Signed-off-by: Michal Kopczan <michal.kopczan@northern.tech>

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

327 existing lines in 44 files now uncovered.

8839 of 10848 relevant lines covered (81.48%)

20226.53 hits per line

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

30.77
/src/common/io/platform/c++17/io.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/io.hpp>
16

17
#include <filesystem>
18

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

23
namespace error = mender::common::error;
24
namespace expected = mender::common::expected;
25

26
namespace fs = std::filesystem;
27

28
expected::ExpectedSize FileSize(const string &path) {
54✔
29
        error_code ec;
54✔
30
        auto size = fs::file_size(fs::path(path), ec);
54✔
31
        if (ec) {
54✔
32
                return expected::unexpected(
×
33
                        error::Error(ec.default_error_condition(), "Could not determine file size of " + path));
×
34
        }
35
        return size;
36
}
37

38
expected::ExpectedUintMax GetAvailableSpace(const string &path) {
×
39
        try {
40
                fs::space_info space_info = fs::space(path);
×
41
                return space_info.available;
42
        } catch (const fs::filesystem_error &e) {
×
43
                return expected::unexpected(error::Error(
×
44
                        e.code().default_error_condition(),
×
45
                        "Failed to get disk space for path '" + path + "': " + e.what()));
×
UNCOV
46
        }
×
47
}
48

49
} // namespace io
50
} // namespace common
51
} // 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

© 2026 Coveralls, Inc