Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
fangchenli committed Oct 22, 2023
1 parent 7af7d15 commit 7323e86
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/tests_unit/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from nebari import schema
from nebari.plugins import nebari_plugin_manager
from _nebari.provider.terraform import deploy


def test_minimal_schema():
Expand Down Expand Up @@ -137,3 +138,19 @@ def test_multiple_providers(config_schema):
msg = r"Multiple providers set: \['local', 'existing'\]"
with pytest.raises(ValidationError, match=msg):
config_schema(**config_dict)


def test_aws_premissions_boundary(config_schema):
permissions_boundary = "arn:aws:iam::123456789012:policy/MyBoundaryPolicy"
config_dict = {
"project_name": "test",
"provider": "aws",
"amazon_web_services": {
"region": "us-east-1",
"kubernetes_version": "1.19",
"permissions_boundary": f"{permissions_boundary}",
},
}
config = config_schema(**config_dict)
assert config.provider == "aws"
assert config.amazon_web_services.permissions_boundary == permissions_boundary

0 comments on commit 7323e86

Please sign in to comment.