Skip to content

Commit

Permalink
only win & linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLecocq committed Sep 19, 2024
1 parent c452421 commit d5d41cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
label: linux-64
Expand Down
10 changes: 5 additions & 5 deletions msnoise_db/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ def create_database(database_name, port):

# Test connection
click.echo("Testing connection...")
subprocess.run([mysql_cmd, '-u', 'root', f'--port={port}', '--ssl=FALSE', '-e', 'SHOW DATABASES;'])
subprocess.run([mysql_cmd, '-u', 'runner', f'--port={port}', '--ssl=FALSE', '-e', 'SHOW DATABASES;'])

# Create database
create_db_command = f'CREATE DATABASE {database_name};'

click.echo(f"Creating database '{database_name}'...")
result = subprocess.run([mysql_cmd, '-u', 'root', f'--port={port}', '--ssl=FALSE', '-e', create_db_command],
result = subprocess.run([mysql_cmd, '-u', 'runner', f'--port={port}', '--ssl=FALSE', '-e', create_db_command],
capture_output=True, text=True)
if result.returncode == 0:
click.echo(f"Database '{database_name}' has been created.")
Expand All @@ -182,7 +182,7 @@ def create_database(database_name, port):

# List databases
click.echo("Listing databases...")
subprocess.run([mysql_cmd, '-u', 'root', f'--port={port}', '--ssl=FALSE', '-e', 'SHOW DATABASES;'])
subprocess.run([mysql_cmd, '-u', 'runner', f'--port={port}', '--ssl=FALSE', '-e', 'SHOW DATABASES;'])

click.echo("Database setup completed.")

Expand All @@ -205,7 +205,7 @@ def drop_database(database_name, port):
drop_db_command = f'DROP DATABASE {database_name};'

click.echo(f"Dropping database '{database_name}'...")
result = subprocess.run([mysql_cmd, '-u', 'root', f'--port={port}', '--ssl=FALSE', '-e', drop_db_command],
result = subprocess.run([mysql_cmd, '-u', 'runner', f'--port={port}', '--ssl=FALSE', '-e', drop_db_command],
capture_output=True, text=True)
if result.returncode == 0:
click.echo(f"Database '{database_name}' has been dropped.")
Expand All @@ -225,7 +225,7 @@ def show_databases(port):

# List databases
click.echo("Listing databases...")
subprocess.run([mysql_cmd, '-u', 'root', f'--port={port}', '--ssl=FALSE', '-e', 'SHOW DATABASES;'])
subprocess.run([mysql_cmd, '-u', 'runner', f'--port={port}', '--ssl=FALSE', '-e', 'SHOW DATABASES;'])

def run():
cli(obj={})
Expand Down

0 comments on commit d5d41cf

Please sign in to comment.