-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(negative): implement delete node
Signed-off-by: Yang Chiu <yang.chiu@suse.com>
- Loading branch information
Showing
22 changed files
with
231 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
*** Settings *** | ||
Documentation K8s keywords | ||
Library ../libs/keywords/k8s_keywords.py | ||
Library ../libs/keywords/workload_keywords.py | ||
Library ../libs/keywords/volume_keywords.py | ||
Library ../libs/keywords/host_keywords.py | ||
|
||
*** Variables *** | ||
|
||
|
||
*** Keywords *** | ||
Stop volume node kubelet of ${workload_kind} ${workload_id} for ${duration} seconds | ||
${workload_name} = generate_name_with_suffix ${workload_kind} ${workload_id} | ||
${volume_name} = get_workload_volume_name ${workload_name} | ||
${node_name} = get_volume_node ${volume_name} | ||
restart_kubelet ${workload_name} ${duration} | ||
|
||
Delete volume of ${workload_kind} ${workload_id} volume node | ||
${workload_name} = generate_name_with_suffix ${workload_kind} ${workload_id} | ||
${volume_name} = get_workload_volume_name ${workload_name} | ||
${deleted_node} = delete_volume_node ${volume_name} | ||
Set Test Variable ${deleted_node} | ||
|
||
Delete volume of ${workload_kind} ${workload_id} replica node | ||
${workload_name} = generate_name_with_suffix ${workload_kind} ${workload_id} | ||
${volume_name} = get_workload_volume_name ${workload_name} | ||
${deleted_node} = delete_replica_node ${volume_name} | ||
Set Test Variable ${deleted_node} | ||
|
||
Add deleted node back | ||
reboot_node_by_name ${deleted_node} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from robot.libraries.BuiltIn import BuiltIn | ||
from k8s.k8s import restart_kubelet | ||
from k8s.k8s import delete_node | ||
|
||
|
||
class k8s_keywords: | ||
|
||
def restart_kubelet(self, node_name, stop_time_in_sec): | ||
restart_kubelet(node_name, int(stop_time_in_sec)) | ||
|
||
def delete_volume_node(self, volume_name): | ||
volume_keywords = BuiltIn().get_library_instance('volume_keywords') | ||
volume_node = volume_keywords.get_volume_node(volume_name) | ||
delete_node(volume_node) | ||
return volume_node | ||
|
||
def delete_replica_node(self, volume_name): | ||
volume_keywords = BuiltIn().get_library_instance('volume_keywords') | ||
replica_node = volume_keywords.get_replica_node(volume_name) | ||
delete_node(replica_node) | ||
return replica_node |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.