Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
PMM-8884 Fix for dev, rc versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Ctvrtka committed Oct 4, 2021
1 parent d93a1b1 commit ace0672
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion services/agents/agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
exposeSecrets
)

var pmmAgentPathsBaseSupport = version.MustParse("2.23.0")
var pmmAgentPathsBaseSupport = version.MustParse("2.22.99")

// redactWords returns words that should be redacted from given Agent logs/output.
func redactWords(agent *models.Agent) []string {
Expand Down
7 changes: 5 additions & 2 deletions services/agents/agents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func requireNoDuplicateFlags(t *testing.T, flags []string) {
func TestPathsBaseForDifferentVersions(t *testing.T) {
left := "{{"
right := "}}"
assert.Equal(t, "/usr/local/percona/pmm2", pathsBase("2.22.99", left, right))
assert.Equal(t, "{{ .paths_base }}", pathsBase("2.23.00", left, right))
assert.Equal(t, "/usr/local/percona/pmm2", pathsBase("2.22.01", left, right))
assert.Equal(t, "{{ .paths_base }}", pathsBase("2.23.0", left, right))
assert.Equal(t, "{{ .paths_base }}", pathsBase("2.23.0-3-g7aa417c", left, right))
assert.Equal(t, "{{ .paths_base }}", pathsBase("2.23.0-beta4", left, right))
assert.Equal(t, "{{ .paths_base }}", pathsBase("2.23.0-rc1", left, right))
}

0 comments on commit ace0672

Please sign in to comment.