#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2019, Intel Corporation
#
#
# pmempool_sync_remote/TEST3 -- pmempool sync with remote replication
#

. ../unittest/unittest.sh

require_test_type medium
require_fs_type any

. common.sh

configure_poolsets 0 1

dump_info_log_remote 0 ${NODE_DIR[0]}${POOLSET_REMOTE[0]} before.log

expect_normal_exit run_on_node 0 rm ${NODE_DIR[0]}remote.0.part.1
expect_normal_exit run_on_node 1 ../pmempool sync ${NODE_DIR[1]}$POOLSET_LOCAL
dump_info_log_remote 0 ${NODE_DIR[0]}${POOLSET_REMOTE[0]} after.1.log

diff_log 0 before.log after.1.log

expect_normal_exit run_on_node 1 ../pmempool sync ${NODE_DIR[1]}$POOLSET_LOCAL

pass
