Skip to content

feat(config): sync hook and mfa config to remote - #2861

Merged
sweatybridge merged 6 commits into
developfrom
sync-hook
Nov 11, 2024
Merged

feat(config): sync hook and mfa config to remote#2861
sweatybridge merged 6 commits into
developfrom
sync-hook

Conversation

@sweatybridge

@sweatybridge sweatybridge commented Nov 8, 2024

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

part 4 of #2814

What is the new behavior?

Sync hook, mfa, and sessions config to remote.

Additional context

Add any other context or screenshots.

@coveralls

coveralls commented Nov 8, 2024

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 11772202395

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 59.788%

Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 11739597993: -0.03%
Covered Lines: 6383
Relevant Lines: 10676

💛 - Coveralls

@sweatybridge sweatybridge changed the title feat(config): sync hook config to remote feat(config): sync hook and mfa config to remote Nov 8, 2024
@sweatybridge
sweatybridge requested a review from avallete November 8, 2024 11:13
Comment thread pkg/config/auth_test.go Outdated
Comment on lines +61 to +70
assert.Contains(t, string(diff), `[hook.mfa_verification_attempt]`)
assert.Contains(t, string(diff), `-enabled = true`)
assert.Contains(t, string(diff), `+enabled = false`)
assert.Contains(t, string(diff), `uri = ""`)
assert.Contains(t, string(diff), `secrets = ""`)

assert.Contains(t, string(diff), `[hook.custom_access_token]`)
assert.Contains(t, string(diff), `-enabled = false`)
assert.Contains(t, string(diff), `+enabled = true`)
assert.Contains(t, string(diff), `uri = ""`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question

Is there an equivalent to toMatchInlineSnapshot in Go ? That could maybe be useful instead of repeating the contains for every line as it would also test for the lines order.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not that I'm aware of. But I'm interested as well.

A low hanging fruit is to write the expected diff output to a file under testdata for comparison.

Comment thread pkg/config/templates/config.toml
@sweatybridge
sweatybridge merged commit 96136cf into develop Nov 11, 2024
@sweatybridge
sweatybridge deleted the sync-hook branch November 11, 2024 04:40
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.

3 participants