Repository: zalando-stups/senza

Issue:
Spotinst elastigroup adds "Config" to resource name
This invalidates many existing Senza templates. It should keep the original name

Discussion:
lmineiro: :+1:
jmcs: :+1: 

Patch:
diff --git a/senza/components/elastigroup.py b/senza/components/elastigroup.py
index 7d39d6b..301359a 100644
--- a/senza/components/elastigroup.py
+++ b/senza/components/elastigroup.py
@@ -64,7 +64,7 @@ def component_elastigroup(definition, configuration, args, info, force, account_
     extract_instance_profile(args, definition, configuration, elastigroup_config)
     # cfn definition
     access_token = _extract_spotinst_access_token(definition)
-    config_name = configuration["Name"] + "Config"
+    config_name = configuration["Name"]
     definition["Resources"][config_name] = {
         "Type": "Custom::elastigroup",
         "Properties": {


Test patch:
diff --git a/tests/test_elastigroup.py b/tests/test_elastigroup.py
index 339bf4e..b98621e 100644
--- a/tests/test_elastigroup.py
+++ b/tests/test_elastigroup.py
@@ -44,7 +44,7 @@ def test_component_elastigroup_defaults(monkeypatch):
 
     result = component_elastigroup(definition, configuration, args, info, False, mock_account_info)
 
-    properties = result["Resources"]["eg1Config"]["Properties"]
+    properties = result["Resources"]["eg1"]["Properties"]
     assert properties["accountId"] == 'act-12345abcdef'
     assert properties["group"]["capacity"] == {"target": 1, "minimum": 1, "maximum": 1}
     instance_types = properties["group"]["compute"]["instanceTypes"]