Merge pull request #303 from rafalste/tests_set_get_params
Add tests for casadm --set-param and --get-param options check
This commit is contained in:
@@ -123,6 +123,15 @@ class FlushParametersAlru:
|
||||
and self.wake_up_time == other.wake_up_time
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def alru_params_range():
|
||||
alru_params = FlushParametersAlru()
|
||||
alru_params.activity_threshold = (500, 1000000)
|
||||
alru_params.flush_max_buffers = (1, 10000)
|
||||
alru_params.staleness_time = (1, 3600)
|
||||
alru_params.wake_up_time = (1, 3600)
|
||||
return alru_params
|
||||
|
||||
@staticmethod
|
||||
def default_alru_params():
|
||||
alru_params = FlushParametersAlru()
|
||||
@@ -144,6 +153,13 @@ class FlushParametersAcp:
|
||||
and self.wake_up_time == other.wake_up_time
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def acp_params_range():
|
||||
acp_params = FlushParametersAcp()
|
||||
acp_params.flush_max_buffers = (1, 10000)
|
||||
acp_params.wake_up_time = (0, 10000)
|
||||
return acp_params
|
||||
|
||||
@staticmethod
|
||||
def default_acp_params():
|
||||
acp_params = FlushParametersAcp()
|
||||
@@ -157,6 +173,12 @@ class SeqCutOffParameters:
|
||||
self.policy = policy
|
||||
self.threshold = threshold
|
||||
|
||||
def __eq__(self, other):
|
||||
return (
|
||||
self.policy == other.policy
|
||||
and self.threshold == other.threshold
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def default_seq_cut_off_params():
|
||||
seq_cut_off_params = SeqCutOffParameters()
|
||||
|
Reference in New Issue
Block a user