binoli.addweb created an issue. See original summary.
@yas
Please review the patch for K8sCloudServerTemplatePluginTest Testcase.
K8sCloudServerTemplatePluginTest
Thanks
The last submitted patch, 2: 3176614-2.patch, failed testing. View results
@binoliaddweb
Thank you for adding the test case.
+++ b/modules/cloud_service_providers/k8s/k8s.module @@ -736,32 +736,8 @@ function k8s_namespace_allowed_values_function(FieldStorageConfig $definition, C + $k8s_service = \Drupal::service('k8s');
@@ -883,7 +859,8 @@ function k8s_cloud_server_template_presave(EntityInterface $entity) { + $k8s_service = \Drupal::service('k8s'); +++ b/modules/cloud_service_providers/k8s/src/Plugin/Validation/Constraint/YamlArrayDataConstraintValidator.php @@ -14,9 +14,10 @@ class YamlArrayDataConstraintValidator extends ConstraintValidator { + $k8s_service = \Drupal::service('k8s'); +++ b/modules/cloud_service_providers/k8s/src/Plugin/Validation/Constraint/YamlObjectSupportConstraintValidator.php @@ -13,11 +13,12 @@ class YamlObjectSupportConstraintValidator extends YamlArrayDataConstraintValida + $k8s_service = \Drupal::service('k8s'); +++ b/modules/cloud_service_providers/k8s/src/Plugin/Validation/Constraint/YamlUrlConstraintValidator.php @@ -70,9 +70,10 @@ class YamlUrlConstraintValidator extends ConstraintValidator { + $k8s_service = \Drupal::service('k8s');
+++ b/modules/cloud_service_providers/k8s/tests/src/Functional/cloud/server_template/CloudServerTemplateTest.php @@ -282,7 +282,8 @@ class CloudServerTemplateTest extends K8sTestBase { + $k8s_service = \Drupal::service('k8s');
Please use dependency injection (DI).
Thank you for reviewing the patch. I changed the code with dependency injection.
Please review the updated patch.
@jigish.addweb and @yas,
Patch looks good. I just have the following comment.
+++ b/modules/cloud_service_providers/k8s/k8s.module @@ -736,32 +736,8 @@ function k8s_namespace_allowed_values_function(FieldStorageConfig $definition, C + $k8s_service = \Drupal::service('k8s'); + return $k8s_service->supportedCloudServerTemplates();
I think we can just combine these statements
\Drupal::service('k8s')->supportedCloudServerTemplates();
@baldwinlouie, @yas
Thank you for reviewing the patch, I refactored the code as per your comment.
Please review the new patch.
The last submitted patch, 9: 3176614-9.patch, failed testing. View results
Thank you for the update. I'll merge the patch to 8.x-2.x and 3.x and close this issue as Fixed.
8.x-2.x
3.x
Fixed
Issue #3176614 by binoli.addweb, jigish.addweb, yas, baldwinlouie: Add a...
Automatically closed - issue fixed for 2 weeks with no activity.
Comments
Comment #2
aadil.addweb commentedComment #3
aadil.addweb commented@yas
Please review the patch for
K8sCloudServerTemplatePluginTestTestcase.Thanks
Comment #5
yas@binoliaddweb
Thank you for adding the test case.
+++ b/modules/cloud_service_providers/k8s/k8s.module@@ -736,32 +736,8 @@ function k8s_namespace_allowed_values_function(FieldStorageConfig $definition, C
+ $k8s_service = \Drupal::service('k8s');
+++ b/modules/cloud_service_providers/k8s/tests/src/Functional/cloud/server_template/CloudServerTemplateTest.php
@@ -282,7 +282,8 @@ class CloudServerTemplateTest extends K8sTestBase {
+ $k8s_service = \Drupal::service('k8s');
Please use dependency injection (DI).
Comment #6
jigish.addweb commentedComment #7
jigish.addweb commented@yas
Thank you for reviewing the patch. I changed the code with dependency injection.
Please review the updated patch.
Thanks
Comment #8
baldwinlouie commented@jigish.addweb and @yas,
Patch looks good. I just have the following comment.
I think we can just combine these statements
Comment #9
aadil.addweb commented@baldwinlouie, @yas
Thank you for reviewing the patch, I refactored the code as per your comment.
Please review the new patch.
Thanks
Comment #11
aadil.addweb commentedComment #12
yas@binoliaddweb
Thank you for the update. I'll merge the patch to
8.x-2.xand3.xand close this issue asFixed.Comment #15
yasComment #16
yasComment #17
yas