Skip to content

Commit e4eb377

Browse files
committed
[tests] Update GrimoireLab setup using env variables
Update the tests to include the latest change from GrimoireLab that configures the default superuser when the setup command is executed. Signed-off-by: Jose Javier Merchante <jjmerchante@bitergia.com>
1 parent d16bcc9 commit e4eb377

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
python-version: ${{ matrix.python-version }}
3232
- name: Install poetry
3333
run: |
34-
curl -sSL https://install.python-poetry.org | python3 -
35-
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV
34+
pipx install poetry
3635
- name: Install dependencies
3736
run: |
3837
poetry install --with tests -vvv

tests/conftest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
mysql = MySqlContainer("mariadb:latest", root_password="root").with_exposed_ports(3306)
3939
redis = RedisContainer(image="valkey/valkey:latest").with_exposed_ports(6379)
40-
opensearch = OpenSearchContainer().with_exposed_ports(9200)
40+
opensearch = OpenSearchContainer(image="opensearchproject/opensearch:3").with_exposed_ports(9200)
4141

4242

4343
def generate_repository(repo_tmpdir, max_commits):
@@ -160,9 +160,10 @@ def setup_grimoirelab(request):
160160
os.environ["GRIMOIRELAB_ARCHIVIST_STORAGE_URL"] = f"http://localhost:{opensearch.get_exposed_port(9200)}"
161161
os.environ["GRIMOIRELAB_USER_PASSWORD"] = "admin"
162162
os.environ["GRIMOIRELAB_ARCHIVIST_BLOCK_TIMEOUT"] = "1000"
163+
os.environ["GRIMOIRELAB_SUPERUSER_USERNAME"] = "admin"
164+
os.environ["GRIMOIRELAB_SUPERUSER_PASSWORD"] = "admin"
163165

164-
subprocess.run(["grimoirelab", "admin", "setup"])
165-
subprocess.run(["grimoirelab", "admin", "create-user", "--username", "admin", "--no-interactive"])
166+
subprocess.run(["grimoirelab", "admin", "setup", "--no-interactive"])
166167

167168
grimoirelab = subprocess.Popen(
168169
["grimoirelab", "run", "server", "--dev"],

0 commit comments

Comments
 (0)