Skip to content

Commit 3420087

Browse files
committed
make auth properties not required
1 parent 14d4e1e commit 3420087

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

.github/workflows/functional.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ jobs:
5151
BASE_URL: ${{ vars.BASE_URL }}
5252
PROGRAMMES_ENABLED: ${{ vars.PROGRAMMES_ENABLED }}
5353
BASIC_AUTH_TOKEN: ${{ secrets.HTTP_AUTH_TOKEN_FOR_TESTS }}
54-
BASIC_AUTH_USERNAME: ""
55-
BASIC_AUTH_PASSWORD: ""
5654

5755
- name: Generate Allure report
5856
if: always()

.github/workflows/functional_selected_device.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ jobs:
7373
BASE_URL: ${{ steps.set-variables.outputs.environment }}
7474
PROGRAMMES_ENABLED: ${{ steps.set-variables.outputs.programmes }}
7575
BASIC_AUTH_TOKEN: ${{ secrets.HTTP_AUTH_TOKEN_FOR_TESTS }}
76-
BASIC_AUTH_USERNAME: ""
77-
BASIC_AUTH_PASSWORD: ""
7876

7977
- name: Generate Allure report
8078
if: always() && steps.set-variables.outputs.deploy_report == 'true'

mavis/test/fixtures/playwright.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ def base_url() -> str:
1111

1212

1313
@pytest.fixture(scope="session")
14-
def basic_auth_credentials() -> dict[str, str]:
14+
def basic_auth_credentials() -> dict[str | None, str | None]:
1515
return {
16-
"username": os.environ["BASIC_AUTH_USERNAME"],
17-
"password": os.environ["BASIC_AUTH_PASSWORD"],
16+
"username": os.environ.get("BASIC_AUTH_USERNAME"),
17+
"password": os.environ.get("BASIC_AUTH_PASSWORD"),
1818
}
1919

2020

2121
@pytest.fixture(scope="session")
22-
def basic_auth_token() -> str:
23-
return os.environ["BASIC_AUTH_TOKEN"]
22+
def basic_auth_token() -> str | None:
23+
return os.environ.get("BASIC_AUTH_TOKEN")
2424

2525

2626
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)