Skip to content

Commit e95ede0

Browse files
committed
fix(tests): fix broken tests after adding spec_annotations to deployments
Fix the broken tests as the function inputs have changed for deployments and scaling.
1 parent 67d8695 commit e95ede0

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

rootfs/scheduler/tests/test_deployments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def create(self, namespace=None, name=generate_random_name(), **kwargs):
2525
'image': 'quay.io/fake/image',
2626
'entrypoint': 'sh',
2727
'command': 'start',
28+
'spec_annotations': kwargs.get('spec_annotations', {}),
2829
}
2930

3031
deployment = self.scheduler.deployment.create(namespace, name, **kwargs)
@@ -45,6 +46,7 @@ def update(self, namespace=None, name=generate_random_name(), **kwargs):
4546
'image': 'quay.io/fake/image',
4647
'entrypoint': 'sh',
4748
'command': 'start',
49+
'spec_annotations': kwargs.get('spec_annotations', {}),
4850
}
4951

5052
deployment = self.scheduler.deployment.update(namespace, name, **kwargs)

rootfs/scheduler/tests/test_horizontalpodautoscaler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def create(self, namespace=None, name=generate_random_name(), **kwargs):
2727
'image': 'quay.io/fake/image',
2828
'entrypoint': 'sh',
2929
'command': 'start',
30+
'spec_annotations': kwargs.get('spec_annotations', {}),
3031
}
3132

3233
# create a Deployment to test HPA with
@@ -75,6 +76,7 @@ def update_deployment(self, namespace=None, name=generate_random_name(), **kwarg
7576
'image': 'quay.io/fake/image',
7677
'entrypoint': 'sh',
7778
'command': 'start',
79+
'spec_annotations': kwargs.get('spec_annotations', {}),
7880
}
7981

8082
deployment = self.scheduler.deployment.update(namespace, name, **d_kwargs)

rootfs/scheduler/tests/test_horizontalpodautoscaler_12_lower.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def create(self, namespace=None, name=generate_random_name(), **kwargs):
3131
'image': 'quay.io/fake/image',
3232
'entrypoint': 'sh',
3333
'command': 'start',
34+
'spec_annotations': kwargs.get('spec_annotations', {}),
3435
}
3536

3637
# create a Deployment to test HPA with
@@ -79,6 +80,7 @@ def update_deployment(self, namespace=None, name=generate_random_name(), **kwarg
7980
'image': 'quay.io/fake/image',
8081
'entrypoint': 'sh',
8182
'command': 'start',
83+
'spec_annotations': kwargs.get('spec_annotations', {}),
8284
}
8385

8486
deployment = self.scheduler.deployment.update(namespace, name, **kwargs)

0 commit comments

Comments
 (0)