Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

PMM-8459 Ability to disable updates. #228

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

JiriCtvrtka
Copy link
Contributor

No description provided.

@JiriCtvrtka JiriCtvrtka marked this pull request as ready for review July 29, 2021 07:57
Copy link
Contributor

@BupycHuk BupycHuk left a comment

Choose a reason for hiding this comment

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

LGTM, but let's change order.

Comment on lines 58 to 70
res, err := serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{
Body: server.ChangeSettingsBody{
EnableUpdates: true,
},
Context: pmmapitests.Context,
})
require.NoError(t, err)
assert.False(t, res.Payload.Settings.UpdatesDisabled)
assert.Empty(t, err)

resg, err := serverClient.Default.Server.GetSettings(nil)
require.NoError(t, err)
assert.False(t, resg.Payload.Settings.UpdatesDisabled)
Copy link
Contributor

Choose a reason for hiding this comment

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

let's first disable updates and then enable updates.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


res, err = serverClient.Default.Server.ChangeSettings(&server.ChangeSettingsParams{
Body: server.ChangeSettingsBody{
DisableUpdates: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

it does nothing actually.
Can we check that DisableUpdates: true disables updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Context: pmmapitests.Context,
})
require.NoError(t, err)
assert.False(t, res.Payload.Settings.UpdatesDisabled)
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't it be True?

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

Successfully merging this pull request may close these issues.

4 participants