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

paticcaa / pain / 17455596282

04 Sep 2025 06:40AM UTC coverage: 56.572% (+0.4%) from 56.202%
17455596282

push

github

ivanallen
add snapshot

Signed-off-by: allen <1007729991@qq.com>

1424 of 3382 branches covered (42.11%)

Branch coverage included in aggregate %.

53 of 79 new or added lines in 9 files covered. (67.09%)

5 existing lines in 3 files now uncovered.

1688 of 2119 relevant lines covered (79.66%)

439.4 hits per line

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

57.14
/src/deva/mock/mock_deva.h
1
#pragma once
2
#include <pain/base/path.h>
3
#include "deva/mock/deva_machine.h"
4

5
namespace pain::deva::mock {
6

7
class MockDeva {
8
public:
9
    MockDeva();
10
    ~MockDeva();
11
    Status start();
12
    Status start(int index);
13
    void stop();
14
    void stop(int index);
15
    Status wait_for_leader(std::string* addr, int timeout_ms = 10000); // NOLINT(readability-magic-numbers)
16
    const std::vector<std::string>& node_addrs() const {
6✔
17
        return _node_addrs;
6✔
18
    }
19
    const std::string& group() const {
28✔
20
        return _group;
28✔
21
    }
22
    const std::string& node_conf() const {
23
        return _node_conf;
24
    }
25
    const std::string& data_path() const {
26
        return _data_path;
27
    }
28
    const std::string& data_path(int index) const {
29
        return _data_paths[index];
30
    }
31

32
    Status snapshot(int index);
33
    Status snapshot();
34

NEW
35
    void do_not_remove_data_path() {
×
NEW
36
        _do_not_remove_data_path = true;
×
NEW
37
    }
×
38

39
private:
40
    std::string _group;
41
    std::string _node_conf;
42
    std::string _data_path;
43
    std::vector<std::string> _data_paths;
44
    std::vector<std::string> _node_addrs;
45
    std::vector<std::unique_ptr<DevaMachine>> _deva_machine;
46
    bool _do_not_remove_data_path = false;
47
};
48

49
} // namespace pain::deva::mock
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