Skip to content

Commit

Permalink
Merge pull request #233 from meroxa/rename-env-offerings
Browse files Browse the repository at this point in the history
Rename environment offerings
  • Loading branch information
dianadoherty authored Jan 4, 2022
2 parents 615fca1 + b76a6eb commit 90cb9f6
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/meroxa
/cli
.envrc
8 changes: 4 additions & 4 deletions cmd/meroxa/root/environments/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,16 @@ func (c *Create) Prompt() error {
if c.flags.Type == "" {
vType := func(input string) error {
switch input {
case "hosted", "dedicated":
case "self_hosted", "private":
return nil
default:
return errors.New("unsupported environment type")
}
}

p := promptui.Prompt{
Label: "Type (hosted or dedicated)",
Default: "hosted",
Label: "Type (self_hosted or private)",
Default: "self_hosted",
Validate: vType,
}

Expand Down Expand Up @@ -275,7 +275,7 @@ func (c *Create) Docs() builder.Docs {
return builder.Docs{
Short: "Create an environment",
Example: `
meroxa env create my-env --type hosted --provider aws --region us-east-1 --config "{\"aws_access_key_id\":\"my_access_key\", \"aws_secret_access_key\":\"my_secret_access_key\"}"
meroxa env create my-env --type self_hosted --provider aws --region us-east-1 --config "{\"aws_access_key_id\":\"my_access_key\", \"aws_secret_access_key\":\"my_secret_access_key\"}"
`,
}
}
2 changes: 1 addition & 1 deletion cmd/meroxa/root/environments/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestCreateEnvironmentExecution(t *testing.T) {
}

c.args.Name = "my-env"
c.flags.Type = "dedicated"
c.flags.Type = "private"
c.flags.Provider = "aws"
c.flags.Region = "aws"
c.flags.Config = []string{"aws_access_key_id=my_access_key", "aws_access_secret=my_access_secret"}
Expand Down
2 changes: 1 addition & 1 deletion cmd/meroxa/root/environments/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestListEnvironmentsExecution(t *testing.T) {
logger := log.NewTestLogger()

ee := &meroxa.Environment{
Type: meroxa.EnvironmentTypeDedicated,
Type: meroxa.EnvironmentTypePrivate,
Name: "environment-1234",
Provider: meroxa.EnvironmentProviderAws,
Region: meroxa.EnvironmentRegionUsEast2,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-runewidth v0.0.10 // indirect
github.com/meroxa/meroxa-go v0.0.0-20211201105336-fe1f1bcf8764
github.com/meroxa/meroxa-go v0.0.0-20220103162704-95e9ee778a21
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4
github.com/rivo/uniseg v0.2.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHX
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg=
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/meroxa/meroxa-go v0.0.0-20211201105336-fe1f1bcf8764 h1:DRjjwhtxG8VAEYIole15SP9DluTDMxcBsTnmru59r2o=
github.com/meroxa/meroxa-go v0.0.0-20211201105336-fe1f1bcf8764/go.mod h1:HDFszURCM1cOpKE699o5Hs0T2tEIXqY+vFcsur3RiwY=
github.com/meroxa/meroxa-go v0.0.0-20220103162704-95e9ee778a21 h1:Oo0jXKgynImgmqZuMzYqEJCqrT/5grNIGnaDY5PU1kk=
github.com/meroxa/meroxa-go v0.0.0-20220103162704-95e9ee778a21/go.mod h1:HDFszURCM1cOpKE699o5Hs0T2tEIXqY+vFcsur3RiwY=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
Expand Down
4 changes: 2 additions & 2 deletions utils/display_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ func TestPipelinesTableWithoutHeaders(t *testing.T) {

func TestEnvironmentsTable(t *testing.T) {
e := &meroxa.Environment{
Type: meroxa.EnvironmentTypeDedicated,
Type: meroxa.EnvironmentTypePrivate,
Name: "environment-1234",
Provider: meroxa.EnvironmentProviderAws,
Region: meroxa.EnvironmentRegionUsEast2,
Expand Down Expand Up @@ -603,7 +603,7 @@ func TestEnvironmentsTable(t *testing.T) {

func TestEnvironmentsTableWithoutHeaders(t *testing.T) {
e := &meroxa.Environment{
Type: meroxa.EnvironmentTypeDedicated,
Type: meroxa.EnvironmentTypePrivate,
Name: "environment-1234",
Provider: meroxa.EnvironmentProviderAws,
Region: meroxa.EnvironmentRegionUsEast2,
Expand Down
2 changes: 1 addition & 1 deletion utils/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func GenerateEnvironment(environmentName string) meroxa.Environment {

return meroxa.Environment{
UUID: "fd572375-77ce-4448-a071-ee4707a599d6",
Type: meroxa.EnvironmentTypeDedicated,
Type: meroxa.EnvironmentTypePrivate,
Name: environmentName,
Region: meroxa.EnvironmentRegionUsEast2,
Provider: meroxa.EnvironmentProviderAws,
Expand Down
6 changes: 3 additions & 3 deletions vendor/github.com/meroxa/meroxa-go/pkg/meroxa/environment.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ github.com/mattn/go-isatty
# github.com/mattn/go-runewidth v0.0.10
## explicit; go 1.9
github.com/mattn/go-runewidth
# github.com/meroxa/meroxa-go v0.0.0-20211201105336-fe1f1bcf8764
# github.com/meroxa/meroxa-go v0.0.0-20220103162704-95e9ee778a21
## explicit; go 1.17
github.com/meroxa/meroxa-go/pkg/meroxa
github.com/meroxa/meroxa-go/pkg/mock
Expand Down

0 comments on commit 90cb9f6

Please sign in to comment.