arg_test.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. suite: container arg test
  2. templates:
  3. - common.yaml
  4. tests:
  5. - it: should create the correct multiple args
  6. set:
  7. some_port: 80
  8. image: &image
  9. repository: nginx
  10. tag: 1.19.0
  11. pullPolicy: IfNotPresent
  12. workload:
  13. workload-name:
  14. enabled: true
  15. primary: true
  16. type: Deployment
  17. podSpec:
  18. containers:
  19. container-name1:
  20. enabled: true
  21. primary: true
  22. imageSelector: image
  23. probes: &probes
  24. liveness:
  25. enabled: false
  26. readiness:
  27. enabled: false
  28. startup:
  29. enabled: false
  30. args:
  31. - --port
  32. - "{{ .Values.some_port }}"
  33. asserts:
  34. - documentIndex: &deploymentDoc 0
  35. isKind:
  36. of: Deployment
  37. - documentIndex: *deploymentDoc
  38. isAPIVersion:
  39. of: apps/v1
  40. - documentIndex: *deploymentDoc
  41. isSubset:
  42. path: spec.template.spec.containers[0]
  43. content:
  44. args:
  45. - --port
  46. - "80"
  47. - it: should create the correct arg command
  48. set:
  49. image: &image
  50. repository: nginx
  51. tag: 1.19.0
  52. pullPolicy: IfNotPresent
  53. workload:
  54. workload-name:
  55. enabled: true
  56. primary: true
  57. type: Deployment
  58. podSpec:
  59. containers:
  60. container-name1:
  61. enabled: true
  62. primary: true
  63. imageSelector: image
  64. probes: *probes
  65. args: --accept-eula
  66. asserts:
  67. - documentIndex: &deploymentDoc 0
  68. isKind:
  69. of: Deployment
  70. - documentIndex: *deploymentDoc
  71. isAPIVersion:
  72. of: apps/v1
  73. - documentIndex: *deploymentDoc
  74. isSubset:
  75. path: spec.template.spec.containers[0]
  76. content:
  77. args:
  78. - --accept-eula
  79. - it: should create the correct multiple args and extraArgs
  80. set:
  81. some_path: /some/path
  82. image: &image
  83. repository: nginx
  84. tag: 1.19.0
  85. pullPolicy: IfNotPresent
  86. workload:
  87. workload-name:
  88. enabled: true
  89. primary: true
  90. type: Deployment
  91. podSpec:
  92. containers:
  93. container-name1:
  94. enabled: true
  95. primary: true
  96. imageSelector: image
  97. probes: *probes
  98. args:
  99. - --port
  100. - "80"
  101. extraArgs:
  102. - --accept-eula
  103. - --path
  104. - "{{ .Values.some_path }}"
  105. asserts:
  106. - documentIndex: &deploymentDoc 0
  107. isKind:
  108. of: Deployment
  109. - documentIndex: *deploymentDoc
  110. isAPIVersion:
  111. of: apps/v1
  112. - documentIndex: *deploymentDoc
  113. isSubset:
  114. path: spec.template.spec.containers[0]
  115. content:
  116. args:
  117. - --port
  118. - "80"
  119. - --accept-eula
  120. - --path
  121. - /some/path