suite: Service tests
templates:
  - templates/service.yaml
tests:
  - it: should create a Service resource
    asserts:
      - isKind:
          of: Service
      - equal:
          path: spec.type
          value: ClusterIP
      - equal:
          path: spec.ports[0].port
          value: 8080
      - equal:
          path: spec.ports[0].targetPort
          value: http

  - it: should use custom service type when specified
    set:
      service.type: LoadBalancer
    asserts:
      - equal:
          path: spec.type
          value: LoadBalancer

  - it: should use custom port when specified
    set:
      service.port: 80
    asserts:
      - equal:
          path: spec.ports[0].port
          value: 80
