Project

Profile

Help

Task #7374

Updated by Ilfat Kinyaev almost 4 years ago

https://github.com/OSLL/mdbci/tree/7374_check_relevance_network_config_file
https://github.com/OSLL/mdbci/pull/279

# 1. Generate node (echo $? => 0)
./mdbci --template confs/docker_lite.json generate SOME_DIR

# 2. Up nodes (echo $? => 0).
./mdbci up SOME_DIR

# 3. It will be SOME_DIR_network_config file In repo directory.

# 4. Run script:
scripts/check_network_config.sh SOME_DIR_network_config

# Variants and results
0) not created machines\network config file missed:
SOME_DIR_network_config not found!

1) ./mdbci up SOME_DIR
SOME_DIR_network_config $NETWORK_CONFIG_FILE is relevant
echo &? =>0

2) vagrant up node0
SOME_DIR_network_config $NETWORK_CONFIG_FILE is NOT relevant
echo $? =>1

3) ./mdbci up SOME_DIR | vagrant destroy node0
SOME_DIR_network_config $NETWORK_CONFIG_FILE is relevant
echo &? =>0

4) ./mdbci up SOME_DIR | vagrant destroy node0 | vagrant up node0
SOME_DIR_network_config $NETWORK_CONFIG_FILE is NOT relevant
echo $? =>1

5) ./mdbci up SOME_DIR | vagrant destroy -f
SOME_DIR_network_config $NETWORK_CONFIG_FILE is NOT relevant: all nodes destroyed
echo $? =>1

Back