enable_service_links_test.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. suite: pod enableServiceLinks test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should pass with enableServiceLinks disabled from "global"
  6. set:
  7. podOptions:
  8. enableServiceLinks: false
  9. workload:
  10. workload-name1:
  11. enabled: true
  12. primary: true
  13. type: Deployment
  14. podSpec: {}
  15. asserts:
  16. - documentIndex: &deploymentDoc 0
  17. isKind:
  18. of: Deployment
  19. - documentIndex: *deploymentDoc
  20. equal:
  21. path: spec.template.spec.enableServiceLinks
  22. value: false
  23. - it: should pass with enableServiceLinks enabled from "global"
  24. set:
  25. podOptions:
  26. enableServiceLinks: true
  27. workload:
  28. workload-name1:
  29. enabled: true
  30. primary: true
  31. type: Deployment
  32. podSpec: {}
  33. asserts:
  34. - documentIndex: *deploymentDoc
  35. isKind:
  36. of: Deployment
  37. - documentIndex: *deploymentDoc
  38. equal:
  39. path: spec.template.spec.enableServiceLinks
  40. value: true
  41. - it: should pass with disabled enableServiceLinks from pod
  42. set:
  43. podOptions:
  44. enableServiceLinks: true
  45. workload:
  46. workload-name1:
  47. enabled: true
  48. primary: true
  49. type: Deployment
  50. podSpec:
  51. enableServiceLinks: false
  52. asserts:
  53. - documentIndex: *deploymentDoc
  54. equal:
  55. path: spec.template.spec.enableServiceLinks
  56. value: false
  57. - it: should pass with enabled enableServiceLinks from pod
  58. set:
  59. podOptions:
  60. enableServiceLinks: false
  61. workload:
  62. workload-name1:
  63. enabled: true
  64. primary: true
  65. type: Deployment
  66. podSpec:
  67. enableServiceLinks: true
  68. asserts:
  69. - documentIndex: *deploymentDoc
  70. equal:
  71. path: spec.template.spec.enableServiceLinks
  72. value: true