Skip to content

Commit

Permalink
#451 fix model docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Mar 8, 2022
1 parent 7e9fbea commit 1f92545
Show file tree
Hide file tree
Showing 37 changed files with 33 additions and 509 deletions.
18 changes: 16 additions & 2 deletions libraries/cloudharness-common/tests/test_applications.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
from .test_env import set_default_environment

set_default_environment()

from cloudharness.applications import ApplicationConfiguration, get_configuration
from cloudharness.utils.config import CloudharnessConfig, ConfigObject



conf_1 = {
'name': 'app1',

'harness': {
'name': 'app1',
'subdomain': 'myapp',
'service': {
'auto': False
'name': 'app1',
'auto': True,
'port': 9000
},
'deployment': {
'auto': True,
Expand Down Expand Up @@ -63,16 +73,20 @@ def test_get_configuration():
}
uut = get_configuration('app1')
assert uut.harness.name == 'app1'
assert not uut.is_auto_service()
assert uut.is_auto_service()
assert uut.is_auto_deployment()
assert uut.is_sentry_enabled()
assert uut.image_name == 'image1-name'
assert uut.get_public_address() == "https://myapp.cloudharness.metacell.us"
assert uut.get_service_address() == "http://app1.ch:9000"
uut = get_configuration('app2')
assert uut.name == 'app2'
assert not uut.is_auto_service()
assert not uut.is_auto_deployment()
assert uut.is_sentry_enabled()



# TODO subapp support
# uut = get_configuration('app2sub')

Expand Down
3 changes: 2 additions & 1 deletion libraries/cloudharness-common/tests/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import os
import yaml

HERE = os.path.dirname(os.path.realpath(__file__)).replace(os.path.sep, '/')
os.environ["CH_VALUES_PATH"] = os.path.join(HERE, "values.yaml")

from cloudharness.utils.env import *
from cloudharness.utils.config import CloudharnessConfig as conf
HERE = os.path.dirname(os.path.realpath(__file__)).replace(os.path.sep, '/')

def set_test_environment():

Expand Down
8 changes: 6 additions & 2 deletions libraries/models/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md

# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
test/*
Expand All @@ -28,11 +28,15 @@ Dockerfile
**/openapi/*
setup.py
**/test/*
**/model/*
**/api/*
**/apis/*
.dockerignore
*/__init__.py
encoder.py
*.sh
*/util.py
*/models/base_model_.py
requirements.txt
*/encoder.py
*/encoder.py
*/model_utils.py
12 changes: 0 additions & 12 deletions libraries/models/docs/ApplicationConfig.md

This file was deleted.

14 changes: 0 additions & 14 deletions libraries/models/docs/ApplicationDependenciesConfig.md

This file was deleted.

29 changes: 0 additions & 29 deletions libraries/models/docs/ApplicationHarnessConfig.md

This file was deleted.

15 changes: 0 additions & 15 deletions libraries/models/docs/ApplicationProbe.md

This file was deleted.

11 changes: 0 additions & 11 deletions libraries/models/docs/ApplicationsConfigsMap.md

This file was deleted.

13 changes: 0 additions & 13 deletions libraries/models/docs/AutoArtifactSpec.md

This file was deleted.

20 changes: 0 additions & 20 deletions libraries/models/docs/BackupConfig.md

This file was deleted.

17 changes: 0 additions & 17 deletions libraries/models/docs/CDCEvent.md

This file was deleted.

16 changes: 0 additions & 16 deletions libraries/models/docs/CDCEventMeta.md

This file was deleted.

13 changes: 0 additions & 13 deletions libraries/models/docs/CpuMemoryConfig.md

This file was deleted.

21 changes: 0 additions & 21 deletions libraries/models/docs/DatabaseDeploymentConfig.md

This file was deleted.

19 changes: 0 additions & 19 deletions libraries/models/docs/DatabaseDeploymentConfigAllOf.md

This file was deleted.

17 changes: 0 additions & 17 deletions libraries/models/docs/DeploymentAutoArtifactConfig.md

This file was deleted.

13 changes: 0 additions & 13 deletions libraries/models/docs/DeploymentResourcesConf.md

This file was deleted.

14 changes: 0 additions & 14 deletions libraries/models/docs/FileResourcesConfig.md

This file was deleted.

11 changes: 0 additions & 11 deletions libraries/models/docs/Filename.md

This file was deleted.

11 changes: 0 additions & 11 deletions libraries/models/docs/FreeObject.md

This file was deleted.

24 changes: 0 additions & 24 deletions libraries/models/docs/HarnessMainConfig.md

This file was deleted.

Loading

0 comments on commit 1f92545

Please sign in to comment.