Skip to content

Commit

Permalink
[#345] add tests for multiple deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
ablatov authored and Aleksandr Blatov committed Oct 17, 2018
1 parent e1e4e5d commit 0476617
Showing 1 changed file with 62 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Test Teardown Run Keywords
Check EDI availability in all enclaves
[Setup] NONE
[Documentation] Try to connect to EDI in each enclave
[Tags] edi cli enclave multi_versions
[Tags] edi cli enclave multi_versions
:FOR ${enclave} IN @{ENCLAVES}
\ ${edi_state} = Run EDI inspect ${enclave}
\ Log ${edi_state}
Expand Down Expand Up @@ -71,6 +71,24 @@ Check EDI undeploy 1 of 2 models without version
Should Be Equal As Integers ${resp.rc} 2
Should contain ${resp.stderr} Please specify version of model

Check EDI undeploy all versioned model instances by id=*
[Documentation] Try to undeploy all models by id=* through EDI console
[Tags] edi cli enclave multi_versions
${resp}= Run EDI undeploy without version ${MODEL_TEST_ENCLAVE} '*'
Should Be Equal As Integers ${resp.rc} 0
${resp}= Run EDI inspect by model id ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID}
Should Be Equal As Integers ${resp.rc} 0
Should be empty ${resp.stdout}

Check EDI undeploy all versioned model instances by versions=*
[Documentation] Try to undeploy all models by versions=* through EDI console
[Tags] edi cli enclave multi_versions
${resp}= Run EDI undeploy with version ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID} '*'
Should Be Equal As Integers ${resp.rc} 0
${resp}= Run EDI inspect by model id ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID}
Should Be Equal As Integers ${resp.rc} 0
Should be empty ${resp.stdout}

Check EDI scale up 1 of 2 models with different versions but the same id
[Tags] edi cli enclave multi_versions
${resp}= Run EDI scale with version ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID} 2 ${TEST_MODEL_1_VERSION}
Expand Down Expand Up @@ -117,6 +135,32 @@ Check EDI scale up 1 of 2 models without version
Should Be Equal As Integers ${resp.rc} 2
Should contain ${resp.stderr} Please specify version of model

Check EDI scale up all instances for 2 models(diff versions) by versions=*
[Documentation] Try to scale up 2 models with different versions but the same id by all versions through EDI console
[Tags] edi cli enclave multi_versions
${resp}= Run EDI scale with version ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID} 2 '*'
Should Be Equal As Integers ${resp.rc} 0
${resp}= Run EDI inspect with parse by model id ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID}
${model_1}= Find model information in edi ${resp} ${TEST_MODEL_ID} ${TEST_MODEL_1_VERSION}
Log ${model_1}
${model_2}= Find model information in edi ${resp} ${TEST_MODEL_ID} ${TEST_MODEL_2_VERSION}
Log ${model_2}
Verify model info from edi ${model_1} ${TEST_MODEL_ID} ${TEST_MODEL_IMAGE_1} ${TEST_MODEL_1_VERSION} 2
Verify model info from edi ${model_2} ${TEST_MODEL_ID} ${TEST_MODEL_IMAGE_2} ${TEST_MODEL_2_VERSION} 2

Check EDI scale up all instances for 2 models(diff versions) by id=*
[Documentation] Try to scale up 2 models with different versions but the same id by all ids through EDI console
[Tags] edi cli enclave multi_versions
${resp}= Run EDI scale ${MODEL_TEST_ENCLAVE} '*' 2
Should Be Equal As Integers ${resp.rc} 0
${resp}= Run EDI inspect with parse by model id ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID}
${model_1}= Find model information in edi ${resp} ${TEST_MODEL_ID} ${TEST_MODEL_1_VERSION}
Log ${model_1}
${model_2}= Find model information in edi ${resp} ${TEST_MODEL_ID} ${TEST_MODEL_2_VERSION}
Log ${model_2}
Verify model info from edi ${model_1} ${TEST_MODEL_ID} ${TEST_MODEL_IMAGE_1} ${TEST_MODEL_1_VERSION} 2
Verify model info from edi ${model_2} ${TEST_MODEL_ID} ${TEST_MODEL_IMAGE_2} ${TEST_MODEL_2_VERSION} 2

Check EDI model inspect by model id return 2 models
[Tags] edi cli enclave multi_versions
${resp}= Run EDI inspect by model id ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID}
Expand Down Expand Up @@ -166,4 +210,20 @@ Check EDI model inspect by valid model id and invalid version
[Tags] edi cli enclave multi_versions
${resp}= Run EDI inspect by model id and model version ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID} ${TEST_MODEL_1_VERSION}test
Should Be Equal As Integers ${resp.rc} 0
Should be empty ${resp.stdout}
Should be empty ${resp.stdout}

Check EDI model inspect by model id=* return all models
[Documentation] Try to inspect 2 models by all ids through EDI console
[Tags] edi cli enclave multi_versions
${resp}= Run EDI inspect by model id ${MODEL_TEST_ENCLAVE} '*'
Should Be Equal As Integers ${resp.rc} 0
Should contain ${resp.stdout} ${TEST_MODEL_IMAGE_1}
Should contain ${resp.stdout} ${TEST_MODEL_IMAGE_2}

Check EDI model inspect by model version=* return all models
[Documentation] Try to inspect 2 models by all versions through EDI console
[Tags] edi cli enclave multi_versions
${resp}= Run EDI inspect by model id and model version ${MODEL_TEST_ENCLAVE} ${TEST_MODEL_ID} '*'
Should Be Equal As Integers ${resp.rc} 0
Should contain ${resp.stdout} ${TEST_MODEL_IMAGE_1}
Should contain ${resp.stdout} ${TEST_MODEL_IMAGE_2}

0 comments on commit 0476617

Please sign in to comment.