Skip to content

Commit

Permalink
Merge pull request #1522 from mesg-foundation/feature/misc
Browse files Browse the repository at this point in the history
Random small things
  • Loading branch information
antho1404 authored Nov 22, 2019
2 parents e6ae30f + 543d66e commit 758d1ca
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (c *DockerContainer) waitForStatus(namespace string, status Status) error {
}

func (c *DockerContainer) createSharedNetwork() error {
// check if already exist
// check if already exists
network, err := c.client.NetworkInspect(context.Background(), c.nsprefix, types.NetworkInspectOptions{})
if network.ID != "" {
c.sharedNetworkID = network.ID
Expand Down
2 changes: 1 addition & 1 deletion core/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func main() {
}()
go func() {
for err := range s.ErrC {
logrus.WithField("module", "main").Warn(err)
logrus.WithField("module", "orchestrator").Warn(err)
}
}()

Expand Down
2 changes: 1 addition & 1 deletion cosmos/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewGenesisValidator(kb *Keybase, name, password, privValidatorKeyFile, priv
}, nil
}

// GenesisExist returns true if the genesis file already exist.
// GenesisExist returns true if the genesis file already exists.
func GenesisExist(genesisFile string) bool {
_, err := os.Stat(genesisFile)
return !os.IsNotExist(err)
Expand Down
1 change: 1 addition & 0 deletions e2e/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func testRunner(t *testing.T) {
testInstanceHash = resp.InstanceHash
})

// TODO: need to test the filters
t.Run("list", func(t *testing.T) {
resp, err := client.RunnerClient.List(context.Background(), &pb.ListRunnerRequest{})
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion sdk/account/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func NewSDK(kb *cosmos.Keybase) *SDK {

// Create generates a new mnemonic and its associated account from a name and password.
func (s *SDK) Create(name, password string) (address *account.Account, mnemonic string, err error) {
// TODO: should throw error if name already exist
// TODO: should throw error if name already exists
// acc, err := kb.Get(name)
// if keyerror.IsErrKeyNotFound(err) {
mnemonic, err = s.kb.NewMnemonic()
Expand Down
8 changes: 4 additions & 4 deletions service/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ func isServiceKeysUnique(s *service.Service) error {
exist := make(map[string]bool)
for _, dep := range s.Dependencies {
if exist[dep.Key] {
errs = append(errs, fmt.Errorf("dependencies[%s] already exist", dep.Key))
errs = append(errs, fmt.Errorf("dependencies[%s] already exists", dep.Key))
}
exist[dep.Key] = true
}

exist = make(map[string]bool)
for _, task := range s.Tasks {
if exist[task.Key] {
errs = append(errs, fmt.Errorf("tasks[%s] already exist", task.Key))
errs = append(errs, fmt.Errorf("tasks[%s] already exists", task.Key))
}
exist[task.Key] = true
if err := isServiceParamsUnique(task.Inputs, fmt.Sprintf("tasks[%s].inputs", task.Key)); err != nil {
Expand All @@ -120,7 +120,7 @@ func isServiceKeysUnique(s *service.Service) error {
exist = make(map[string]bool)
for _, event := range s.Events {
if exist[event.Key] {
errs = append(errs, fmt.Errorf("events[%s] already exist", event.Key))
errs = append(errs, fmt.Errorf("events[%s] already exists", event.Key))
}
exist[event.Key] = true

Expand All @@ -141,7 +141,7 @@ func isServiceParamsUnique(ps []*service.Service_Parameter, errprefix string) er
existparam := make(map[string]bool)
for _, p := range ps {
if existparam[p.Key] {
errs = append(errs, fmt.Errorf("%s[%s] already exist", errprefix, p.Key))
errs = append(errs, fmt.Errorf("%s[%s] already exists", errprefix, p.Key))
}
existparam[p.Key] = true

Expand Down

0 comments on commit 758d1ca

Please sign in to comment.