Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(recipe): add support for string based value(s) in pathcheck #142

Merged
merged 1 commit into from
Sep 17, 2020
Merged

feat(recipe): add support for string based value(s) in pathcheck #142

merged 1 commit into from
Sep 17, 2020

Conversation

amitbhatt818
Copy link
Contributor

@amitbhatt818 amitbhatt818 commented Sep 12, 2020

This PR adds support to verify string based value in pathCheck field

Sample experiment

  • Following recipe asserts spec.clusterIP is set to None
apiVersion: dope.mayadata.io/v1
kind: Recipe
metadata:
  name: svc-1
  namespace: d-testing
spec:
  tasks:
  - name: assert-svc-running
    assert:
      state:
        kind: Service
        apiVersion: v1
        metadata:
          name: cassandra
          namespace: kubera
      pathCheck:
        path: spec.clusterIP
        pathCheckOperator: Equals
        value: None # this is a string value

Output:

$ kubectl describe recipe.dope.mayadata.io/svc-1 -n d-testing

Name:         svc-1
Namespace:    d-testing
Status:
  Execution Time:
    Readable Value:    4ms
    Value In Seconds:  0.004093446
  Phase:               Completed
  Task Count:
    Failed:   0
    Skipped:  0
    Total:    1
    Warning:  0
  Tasks:
    Assert - Svc - Running:
      Message:  PathCheckValueEquals: Resource kubera cassandra: GVK /v1, Kind=Service: TaskName assert-svc-running
      Phase:    Passed
      Step:     1
      Verbose:  Expected value None got None

Signed-off-by: Amit Bhatt amitbhatt818@gmail.com

@AmitKumarDas AmitKumarDas changed the title feat(recipe): Add support for string in pathcheck feat(recipe): add support for string based value(s) in pathcheck Sep 14, 2020
Signed-off-by: Amit Bhatt <amitbhatt818@gmail.com>
@AmitKumarDas AmitKumarDas merged commit 4540187 into mayadata-io:master Sep 17, 2020
@AmitKumarDas
Copy link

🎉 This PR is included in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants