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

fix e2e tests #2748

Merged
merged 3 commits into from
May 18, 2022
Merged

fix e2e tests #2748

merged 3 commits into from
May 18, 2022

Conversation

makkes
Copy link
Member

@makkes makkes commented May 18, 2022

fix e2e check test

The output of kubectl version has changed with newer kubectl version
from

{
  "serverVersion": ...,
  "clientVersion": ...
}

to

{
  "serverVersion": ...,
  "clientVersion": ...,
  "kustomizeVersion": ...
}

So the kustomizeVersion field is new which causes the JSON
unmarshaling to fail.

We now just unmarshal it to map[string]interface{} and peel the
server git version out of that map manually w/o unmarshalling the JSON
into a custom type.

Signed-off-by: Max Jonas Werner <mail@makk.es>
Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

Thank you @makkes !

LGTM

The output of `kubectl version` has changed with newer kubectl version
from

```
{
  "serverVersion": ...,
  "clientVersion": ...
}
```

to

```
{
  "serverVersion": ...,
  "clientVersion": ...,
  "kustomizeVersion": ...
}
```

So the `kustomizeVersion` field is new which causes the JSON
unmarshaling to fail.

We now just unmarshal it to `map[string]interface{}` and peel the
server git version out of that map manually w/o unmarshalling the JSON
into a custom type.

Signed-off-by: Max Jonas Werner <mail@makk.es>
@makkes makkes changed the title make e2e test easier to debug fix e2e tests May 18, 2022
@makkes
Copy link
Member Author

makkes commented May 18, 2022

@pjbgf I added a commit that actually fixes the e2e tests.

@makkes makkes requested a review from pjbgf May 18, 2022 14:56
@makkes makkes self-assigned this May 18, 2022
@makkes makkes added the bug Something isn't working label May 18, 2022
It's not part of the `flux check` output.

Signed-off-by: Max Jonas Werner <mail@makk.es>
@makkes makkes merged commit 46fbc7c into fluxcd:main May 18, 2022
@makkes makkes deleted the debug-e2e-failure branch May 18, 2022 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants