Skip to content

Conversation

@uwedeportivo
Copy link
Contributor

@uwedeportivo uwedeportivo commented Oct 20, 2020

will be used for executing automated regression tests against k8s cluster.

you can use a script similar to the one below to create the first admin and let it spit out the token

validate_script.json:

{
  "firstAdmin": {
    "email": "foo@sourcegraph.com",
    "username": "foo",
    "password": "{{ .foo_pw}}",
    "createAccessToken": true
  }
}

you can run it like so:

EXPORT SRC_ENDPOINT=http://localhost:3080
src validate -context foo_pw=testtesttest validate_script.json

@uwedeportivo uwedeportivo requested a review from daxmc99 October 20, 2020 01:24
@davejrt
Copy link
Contributor

davejrt commented Oct 20, 2020

Cool, maybe we could output this value to a file, so we can source it later so all the env vars are exported before we run any yarn commands.

@davejrt davejrt self-requested a review October 20, 2020 01:39
Copy link
Contributor

@daxmc99 daxmc99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uwedeportivo uwedeportivo merged commit f686636 into main Oct 21, 2020
@uwedeportivo uwedeportivo deleted the validate_create_token branch October 21, 2020 04:04
scjohns pushed a commit that referenced this pull request Apr 24, 2023
…#358)

* validate command: ability to create access token for first admin user

* revert accidental test file additions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants