Skip to content

Commit

Permalink
Fix vault linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed Nov 21, 2021
1 parent e6494b1 commit 9e14a0d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/security/vault.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from abc import ABC
import json
import logging
import os
import yaml
from abc import ABC

import yaml
from cryptography.fernet import Fernet, MultiFernet

try:
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy_test/api/test_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
import os

from requests import (
delete,
get,
put
)

from ._framework import ApiTestCase

TEST_USER_EMAIL = "user_for_users_index_test@bx.psu.edu"
TEST_USER_EMAIL = "vault_test_user@bx.psu.edu"


class VaultApiTestCase(ApiTestCase):
Expand Down
1 change: 1 addition & 0 deletions test/unit/app/dependencies/test_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
runners:
runner1:
load: job_runner_A
"""
VAULT_CONF_CUSTOS = """
type: custos
"""
Expand Down
5 changes: 3 additions & 2 deletions test/unit/security/test_vault.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from abc import ABC
import os
import string
import tempfile
import unittest
from abc import ABC
from cryptography.fernet import InvalidToken

from galaxy.app_unittest_utils.galaxy_mock import MockApp, MockAppConfig
from galaxy.security import vault
Expand Down Expand Up @@ -64,7 +65,7 @@ def test_wrong_keys(self):
# should fail because decryption keys are the wrong
app.config.vault_config_file = VAULT_CONF_DATABASE_INVALID
self.vault = vault.VaultFactory.from_app(app)
with self.assertRaises(Exception):
with self.assertRaises(InvalidToken):
self.vault.read_secret("my/incorrect/secret")


Expand Down

0 comments on commit 9e14a0d

Please sign in to comment.