Skip to content

Commit

Permalink
commands: reverse actual and expected values in asserts (#1425)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Oct 3, 2023
1 parent 1ba1648 commit 68b97c8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions commands/apps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ func TestRunAppsGetLogs(t *testing.T) {

tc := config.Doit.(*doctl.TestConfig)
tc.ListenFn = func(url *url.URL, token string, schemaFunc listen.SchemaFunc, out io.Writer) listen.ListenerService {
assert.Equal(t, token, "aa-bb-11-cc-33")
assert.Equal(t, url.String(), "wss://proxy-apps-prod-ams3-001.ondigitalocean.app/?token=aa-bb-11-cc-33")
assert.Equal(t, "aa-bb-11-cc-33", token)
assert.Equal(t, "wss://proxy-apps-prod-ams3-001.ondigitalocean.app/?token=aa-bb-11-cc-33", url.String())
return tm.listen
}

Expand Down
2 changes: 1 addition & 1 deletion commands/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestAuthInitConfig(t *testing.T) {
"unset": map[interface{}]interface{}{"dev-config": ""},
},
)
assert.Equal(t, devConfigSetting, expectedConfigSetting, "unexpected setting for 'dev.config'")
assert.Equal(t, expectedConfigSetting, devConfigSetting, "unexpected setting for 'dev.config'")
})
}

Expand Down
2 changes: 1 addition & 1 deletion commands/monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func TestAlertPolicyCreate_ValidTypes(t *testing.T) {
config.Doit.Set(config.NS, doctl.ArgAlertPolicySlackURLs, slackURLsStr)

err := RunCmdAlertPolicyCreate(config)
assert.Equal(t, err, tt.expectedErr)
assert.Equal(t, tt.expectedErr, err)
})
}
}
Expand Down
6 changes: 1 addition & 5 deletions commands/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,11 +700,7 @@ func TestRegistryLogin(t *testing.T) {

config.Out = os.Stderr
err := RunRegistryLogin(config)
if test.err != nil {
assert.Error(t, test.err, err)
} else {
assert.NoError(t, err)
}
assert.Equal(t, test.err, err)
})
})
}
Expand Down

0 comments on commit 68b97c8

Please sign in to comment.