Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dgraphtest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ type ClusterConfig struct {
lambdaURL string
featureFlags []string
customPlugins bool
startupArgs []string
snapShotAfterEntries uint64
snapshotAfterDuration time.Duration
repoDir string
Expand Down Expand Up @@ -243,6 +244,13 @@ func (cc ClusterConfig) WithGraphqlLambdaURL(url string) ClusterConfig {
return cc
}

// WithStartupArg appends an extra flag to the Alpha startup command in the form
// --arg=value. It may be called multiple times to accumulate additional flags.
func (cc ClusterConfig) WithStartupArg(arg, value string) ClusterConfig {
cc.startupArgs = append(cc.startupArgs, fmt.Sprintf("--%s=%s", arg, value))
return cc
}

// WithMcp sets the mcp flag for alpha
func (cc ClusterConfig) WithMCP() ClusterConfig {
cc.mcp = true
Expand Down
2 changes: 2 additions & 0 deletions dgraphtest/dgraph.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ func (a *alpha) cmd(c *LocalCluster) []string {
acmd = append(acmd, "--mcp")
}

acmd = append(acmd, c.conf.startupArgs...)

return acmd
}

Expand Down
Loading