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

Add Gomega HaveKeyWithValue #225

Merged
merged 6 commits into from
Jul 1, 2017

Conversation

OmarDarwish
Copy link
Contributor

In my fork, I have an EC2 resource that returns a map of instance tags. This Gomega matcher allows you to do checks like the following:

aws_ec2:
  tags:
     have-key-with-value:
       foo: 1
       bar: baz

@OmarDarwish OmarDarwish changed the title Add Gomega have-key-with-value Add Gomega HaveKeyWithValue Apr 22, 2017

var key, val types.GomegaMatcher
for k, v := range valueI {
key, err = matcherToGomegaMatcher(k)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does matcherToGomegaMatcher() on the key provide?

Can you give an example of this usage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No use because of constraints with YAML. Removed.

@OmarDarwish
Copy link
Contributor Author

@aelsabbahy any updates with this PR and #233 #226?

@aelsabbahy aelsabbahy merged commit c67bb86 into goss-org:master Jul 1, 2017
BenjaminHerbert pushed a commit to BenjaminHerbert/goss that referenced this pull request May 28, 2020
* Add Gomega have-key-with-value

* Don't convert have-key-with-value key to gomega

* Fix unit test for have-key-with-value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants