Initial curated Unraid-AppOps-Gateway source from 3bd6f6fee310125bfbb4d4650389a817f498724d
This commit is contained in:
commit
1dfbca08a1
528 files changed
+131054
No files matched your search
@@ -0,0 +1,32 @@
|
||||
from backend.app.services.app_classifier import classify_container
|
||||
|
||||
|
||||
def test_dockdeck_image_has_first_class_inventory_metadata():
|
||||
result = classify_container(
|
||||
{
|
||||
'name': 'web-portal',
|
||||
'image': 'dockdeck:local',
|
||||
'ports': ['1218:3000'],
|
||||
}
|
||||
)
|
||||
|
||||
assert result['app_type'] == 'dockdeck'
|
||||
assert result['suggested_app_id'] == 'dockdeck'
|
||||
assert result['category'] == 'infrastructure'
|
||||
assert result['subcategory'] == 'service_portal'
|
||||
assert result['criticality'] == 'medium'
|
||||
assert result['connector'] == 'none'
|
||||
assert result['policy_profile'] == 'internal_service'
|
||||
assert result['protected'] is False
|
||||
assert result['privacy_sensitive'] is True
|
||||
assert result['healthcheck_suggestion'] == {'port': 1218}
|
||||
assert result['voice_suggestion'] == 'disabled'
|
||||
assert result['confidence'] >= 0.8
|
||||
assert result['import_status'] == 'discovered'
|
||||
|
||||
|
||||
def test_dockdeck_name_match_does_not_require_local_image_tag():
|
||||
result = classify_container({'name': 'DockDeck', 'image': 'custom/build'})
|
||||
|
||||
assert result['app_type'] == 'dockdeck'
|
||||
assert result['category'] == 'infrastructure'
|
||||
Reference in new issue
Block a user