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

test(patch): add integration test #492

Merged
merged 3 commits into from
Jun 10, 2019
Merged

test(patch): add integration test #492

merged 3 commits into from
Jun 10, 2019

Conversation

celiawaggoner
Copy link
Contributor

No description provided.

Copy link
Contributor

@silasbw silasbw left a comment

Choose a reason for hiding this comment

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

hey, thanks for contributing this 🥂

one nit'ish set of comments.

pod = await client.api.v1.namespaces(namespace).pods(name).get()
expect(pod.body.spec.containers[0].image).equals('busybox')

await client.api.v1.namespaces(namespace).pods(name).patch({
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: use a different patch body. this one could cause a docker to pull a new image to the test machine, or maybe we're already using busybox:musl (and the patch could be failing). patching annotations is a common thing to do in applications that use this library:

await client.api.v1.namespaces(namespace).pods(name).patch({
  body: {
    metadata: { 
      annotations: {
        'patch-test0': process.pid
      }
    }
  } 
})

})

pod = await client.api.v1.namespaces(namespace).pods(name).get()
expect(pod.body.spec.containers[0].image).equals('busybox:musl')
Copy link
Contributor

Choose a reason for hiding this comment

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

Update this too.

@silasbw silasbw merged commit 92d9729 into master Jun 10, 2019
@silasbw silasbw deleted the patch-int-test branch June 10, 2019 20:41
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.

None yet

3 participants