Conversation
aeneasr
left a comment
There was a problem hiding this comment.
That's pretty much what I imagined! :)
|
|
||
| go func() { | ||
| stdout, stderr, err := newCommand(t, ctx).Exec(os.Stdin, "proxy", upstream.URL, "--"+proxy.NoCertInstallFlag, "--"+remote.FlagProject, "demo", "--"+proxy.PortFlag, fmt.Sprintf("%d", port), "--"+proxy.ProtectPathsFlag, "/private/1", "--"+proxy.ProtectPathsFlag, "/private/2") | ||
| stdout, stderr, err := newCommand(t, ctx).Exec(os.Stdin, "proxy", upstream.URL, "--"+proxy.NoCertInstallFlag, "--"+proxy.PortFlag, fmt.Sprintf("%d", port), "--"+proxy.ProtectPathsFlag, "/private/1", "--"+proxy.ProtectPathsFlag, "/private/2") |
There was a problem hiding this comment.
I am very astonished that the tests are passing. Something can't be right!
aeneasr
left a comment
There was a problem hiding this comment.
This looks good, just needs some tests now!
| working_directory: /go/src/github.com/ory/cli | ||
| steps: | ||
| - checkout | ||
| - run: sudo bash -c "export PATH=$PATH:/home/circleci/.local/bin:/home/circleci/bin:/go/bin:/usr/local/go/bin:/usr/local/sbi && make test" |
There was a problem hiding this comment.
@Demonsthere I reverted this because it did not look relevant for the CI to work.
| "context" | ||
| "encoding/json" | ||
| "fmt" | ||
| "github.com/julienschmidt/httprouter" |
There was a problem hiding this comment.
@Demonsthere please run make format before requesting review
| } | ||
|
|
||
| func TestIdentityListNoToken(t *testing.T) { | ||
| // See https://github.com/ory-corp/cloud/issues/865 |
There was a problem hiding this comment.
@Demonsthere I disabled the tests for now - we can reenable them once this is merged into cloud
| c := retryablehttp.NewClient() | ||
| c.Logger = nil |
There was a problem hiding this comment.
@Demonsthere the CLI printed several debug outputs:
2021/05/14 12:07:46 [DEBUG] GET https://api.console.ory.sh/backoffice/token/slug
2021/05/14 12:07:47 [DEBUG] GET https://playground.projects.oryapis.com/api/kratos/admin/identities
This really confuses people. We often get issues where people ask about a warning or a log entry because they fear something does not work. They expect to be no output expect the one they ... expect. So when writing these CLI commands we need to ensure that no random debug statements get printed. Also, here, my log level was not set to DEBUG which should have been the case if we actually want to see some debugging logs.
| func RegisterClientFlags(flags *pflag.FlagSet) { | ||
| flags.String(FlagAPIEndpoint, "https://oryapis.com", "Use a different endpoint.") | ||
| flags.String(FlagConsoleAPI, "https://console.ory.sh", "Use a different URL.") | ||
| flags.String(FlagConsoleAPI, "https://api.console.ory.sh", "Use a different URL.") |
There was a problem hiding this comment.
@Demonsthere the default arguments here was incorrect
| github.com/ory/jsonschema/v3 v3.0.3 | ||
| github.com/ory/kratos v0.6.0-alpha.2 | ||
| github.com/ory/kratos-client-go v0.5.4-alpha.1.0.20210308170950-06c2c1c071a8 | ||
| github.com/ory/kratos-client-go v0.6.1-alpha.1 |
There was a problem hiding this comment.
@Demonsthere cloud runs 0.6.1 so I've updated the SDK dependency
Related issue
Proposed changes
--projectflag to retrieving the project slug from dedicated endpointChecklist
and signed the CLA.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
appropriate).
Further comments