Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dummy email ids #118

Merged
merged 8 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ['--profile', 'black']
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
- repo: [email protected]:Yelp/detect-secrets
Expand All @@ -10,7 +16,7 @@ repos:
args: ['--baseline', '.secrets.baseline']
exclude: poetry.lock
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down
28 changes: 14 additions & 14 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@
"filename": "gen3-integration-tests/tests/test_audit_service.py",
"hashed_secret": "62bd0c4d3a6b445b13212d23500a7f0916757c3e",
"is_verified": false,
"line_number": 185,
"line_number": 181,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_audit_service.py",
"hashed_secret": "e1fa8c0685ac2b51db97b7bd00b9afa63489d30c",
"is_verified": false,
"line_number": 194,
"line_number": 190,
"is_secret": false
}
],
Expand All @@ -154,87 +154,87 @@
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "62bd0c4d3a6b445b13212d23500a7f0916757c3e",
"is_verified": false,
"line_number": 29,
"line_number": 28,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "e1fa8c0685ac2b51db97b7bd00b9afa63489d30c",
"is_verified": false,
"line_number": 36,
"line_number": 35,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "faad2c1400e2071d0b52a70589e6a69e960a8f66",
"is_verified": false,
"line_number": 43,
"line_number": 42,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "e9728a38017dc43b9240cc2a554bbc85c4951ac9",
"is_verified": false,
"line_number": 53,
"line_number": 52,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "c9db8b43a10ab86e1ff61c6639f7d12ec42538ba",
"is_verified": false,
"line_number": 63,
"line_number": 62,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "784c6e9de4ecdc99633fd8df4bb46d1a547cce47",
"is_verified": false,
"line_number": 73,
"line_number": 72,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "e0023bf0f573f727496fa24af0c1d26f05b23fc8",
"is_verified": false,
"line_number": 83,
"line_number": 82,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "191e56b8fb18e2008781d6953cbb73be28ce66e7",
"is_verified": false,
"line_number": 95,
"line_number": 94,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "7c3be26a466754059b7c75e8b459a4ade9c2117f",
"is_verified": false,
"line_number": 102,
"line_number": 101,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "e19559ed661532682397daed1651e91321c4c8c4",
"is_verified": false,
"line_number": 112,
"line_number": 111,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "gen3-integration-tests/tests/test_centralized_auth.py",
"hashed_secret": "9ec16d1f5ec2441b412f6ddef0676376a6bf7dd4",
"is_verified": false,
"line_number": 119,
"line_number": 118,
"is_secret": false
}
],
Expand Down Expand Up @@ -363,5 +363,5 @@
}
]
},
"generated_at": "2024-10-03T20:08:45Z"
"generated_at": "2024-10-18T14:20:42Z"
}
30 changes: 8 additions & 22 deletions gen3-integration-tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import json
import os
import pytest
import shutil

from xdist import is_xdist_controller
from xdist.scheduler import LoadScopeScheduling

from utils import logger
from utils import gen3_admin_tasks as gat
from utils import test_setup as setup
from utils import TEST_DATA_PATH_OBJECT
import pytest

# Using dotenv to simplify setting up env vars locally
from dotenv import load_dotenv
from utils import TEST_DATA_PATH_OBJECT
from utils import gen3_admin_tasks as gat
from utils import logger
from utils import test_setup as setup
from xdist import is_xdist_controller
from xdist.scheduler import LoadScopeScheduling

load_dotenv()
requires_fence_client_marker_present = False
Expand Down Expand Up @@ -105,20 +104,7 @@ def pytest_configure(config):
pytest.clients = {}
pytest.rotated_clients = {}
# Accounts used for testing
pytest.users = {}
pytest.users["main_account"] = "[email protected]" # default user
pytest.users["indexing_account"] = "[email protected]" # indexing admin
pytest.users["auxAcct1_account"] = "[email protected]" # auxAcct1 user
pytest.users["auxAcct2_account"] = "[email protected]" # auxAcct2 user
pytest.users["user0_account"] = (
"[email protected]" # user0 dcf_integration_test
)
pytest.users["user1_account"] = (
"[email protected]" # user1 dcf_integration_test
)
pytest.users["user2_account"] = (
"[email protected]" # user2 dcf_integration_test
)
pytest.users = setup.get_users()

# Generate api key and auth headers
pytest.api_keys = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
e.g., 1, 300 (value in seconds)

String parameter USERNAME
e.g., [email protected]
e.g., [email protected]
This is to help create access token

*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
String parameter NAMESPACE
e.g. jenkins-blood
String parameter USERNAME
e.g. dummy-one@planx-pla.net
e.g. dummy-one@example.org
String parameter EMAIL
e.g. [email protected]
e.g. [email protected]

*/
pipeline {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
e.g., qa-anvil
String parameter USERNAME
Username
e.g., [email protected]
e.g., [email protected]
String parameter JENKINS_NAMESPACE
Default value - default

Expand Down Expand Up @@ -114,25 +114,25 @@ spec:
source $GEN3_HOME/gen3/gen3setup.sh

echo "creating main_account api key for \$NAMESPACE"
gen3 api api-key [email protected] > \${NAMESPACE}_main_account.json
gen3 api api-key [email protected] > \${NAMESPACE}_main_account.json

echo "creating indexing_account for \$NAMESPACE"
gen3 api api-key ctds.indexing[email protected] > \${NAMESPACE}_indexing_account.json
gen3 api api-key indexing@example.org > \${NAMESPACE}_indexing_account.json

echo "creating auxAcct1 for \$NAMESPACE"
gen3 api api-key dummy-one@planx-pla.net > \${NAMESPACE}_auxAcct1_account.json
gen3 api api-key dummy-one@example.org > \${NAMESPACE}_dummy_one.json

echo "creating auxAcct2 for \$NAMESPACE"
gen3 api api-key smarty-two@planx-pla.net > \${NAMESPACE}_auxAcct2_account.json
gen3 api api-key smarty-two@example.org > \${NAMESPACE}_smarty_two.json

echo "creating user0 for \$NAMESPACE"
gen3 api api-key [email protected] > \${NAMESPACE}_user0_account.json
gen3 api api-key [email protected] > \${NAMESPACE}_user0_account.json

echo "creating user1 for \$NAMESPACE"
gen3 api api-key [email protected] > \${NAMESPACE}_user1_account.json
gen3 api api-key [email protected] > \${NAMESPACE}_user1_account.json

echo "creating user2 for \$NAMESPACE"
gen3 api api-key [email protected] > \${NAMESPACE}_user2_account.json
gen3 api api-key [email protected] > \${NAMESPACE}_user2_account.json
'''
}
}
Expand Down
Loading
Loading