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

mendersoftware / mender / 1073264463

15 Nov 2023 10:33AM UTC coverage: 80.186% (+0.1%) from 80.062%
1073264463

push

gitlab-ci

kacf
docs: Restore Update Control XML file for documentation purposes.

This is a partial restore of ee5dc24db79fc57, just to get the XML file
back. The feature is still removed, this is just to be able to keep it
in the documentation with a notice that says it's removed (already
merged to master in 426caf729c3191b).

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>

6969 of 8691 relevant lines covered (80.19%)

9260.9 hits per line

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

84.62
/src/artifact/v3/payload/payload.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 <artifact/v3/payload/payload.hpp>
16
#include <artifact/error.hpp>
17

18
#include <string>
19
#include <vector>
20

21
#include <common/io.hpp>
22

23
namespace mender {
24
namespace artifact {
25
namespace v3 {
26
namespace payload {
27

28
using namespace std;
29

30

31
ExpectedSize Reader::Read(vector<uint8_t>::iterator start, vector<uint8_t>::iterator end) {
613✔
32
        return reader_->Read(start, end);
613✔
33
}
34

35
ExpectedPayloadReader Payload::Next() {
155✔
36
        auto expected_tar_entry = tar_reader_->Next();
155✔
37
        if (!expected_tar_entry) {
155✔
38
                if (expected_tar_entry.error().code
96✔
39
                        == tar::MakeError(tar::ErrorCode::TarEOFError, "").code) {
96✔
40
                        return expected::unexpected(parser_error::MakeError(
96✔
41
                                parser_error::Code::NoMorePayloadFilesError, expected_tar_entry.error().message));
192✔
42
                }
43
                return expected::unexpected(parser_error::MakeError(
×
44
                        parser_error::Code::ParseError, expected_tar_entry.error().message));
×
45
        }
46
        auto tar_entry {expected_tar_entry.value()};
59✔
47
        return Reader {std::move(tar_entry), manifest_.Get("data/0000/" + tar_entry.Name())};
59✔
48
}
49

50
} // namespace payload
51
} // namespace v3
52
} // namespace artifact
53
} // 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