-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Mattermost config get/set functionality
This initial implementation is done by executing the Mattermost CLI in one of the running containers of the cluster installation. In the future, we should move to a direct API approach and should use Kubernetes jobs. That said, this change lays the groundwork for running arbitrary commands in the Mattermost pods.
- Loading branch information
1 parent
d12ca03
commit 442f1eb
Showing
11 changed files
with
275 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
package api_test | ||
|
||
import "github.com/mattermost/mattermost-cloud/model" | ||
|
||
type mockSupervisor struct { | ||
} | ||
|
||
func (s *mockSupervisor) Do() error { | ||
return nil | ||
} | ||
|
||
type mockProvisioner struct { | ||
} | ||
|
||
func (s *mockProvisioner) ExecMattermostCLI(*model.Cluster, *model.ClusterInstallation, ...string) ([]byte, error) { | ||
return []byte(`{"ServiceSettings":{"SiteURL":"http://test.example.com"}}`), nil | ||
} | ||
|
||
func sToP(s string) *string { | ||
return &s | ||
} |
Oops, something went wrong.