// ĠCopyright Ġ 2 0 0 0 - 2 0 2 0 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġcom . intellij . internal . statistics . config Ċ Ċ import Ġcom . intellij . internal . statistic . config . bean . Event Log Bucket Range Ċ import Ġcom . intellij . internal . statistic . config . bean . Event Log Send Configuration Ċ import Ġcom . intellij . internal . statistic . event Log . Event Log Build Type Ċ import Ġcom . intellij . internal . statistic . event Log . Event Log Build Type .* Ċ import Ġorg . junit . Test Ċ Ċ private Ġval ĠBUILD _ TYPES Ġ= Ġset Of ( RELEASE , ĠE AP , ĠUNKNOWN ) Ċ private Ġval ĠEND POINTS Ġ= Ġset Of (" send ", Ġ" metadata ", Ġ" dictionary ") Ċ Ċ class ĠEvent Log ConfigParser Test Ġ: ĠEvent Log Config Base Parser Test () Ġ{ ĊĊĠ Ġprivate Ġfun Ġdo Test Versions ( versions : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġexisting Config : ĠMap < Event Log Build Type , ĠEvent Log Send Configuration > Ġ= Ġempty Map (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnot Existing Config : ĠSet < Event Log Build Type > Ġ= Ġempty Set (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġexisting Endpoints : ĠMap < String , ĠString > Ġ= Ġempty Map (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnot Existing Endpoints : ĠSet < String > Ġ= Ġempty Set ()) Ġ{ ĊĠĠĠ Ġdo Test (""" Ċ { ĊĠ Ġ" product Code ": Ġ" IU ", ĊĠ Ġ" versions ": Ġ[ """ Ġ+ Ġversions Ġ+ Ġ""" ] Ċ } """, Ġexisting Config , Ġexisting Endpoints , Ġnot Existing Config , Ġnot Existing Endpoints ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġdo Test Empty Versions ( versions : ĠString ) Ġ{ ĊĠĠĠ Ġdo Test Versions ( ĊĠĠĠĠĠ Ġversions , ĊĠĠĠĠĠ Ġnot Existing Config Ġ= Ġset Of ( RELEASE , ĠE AP ), ĊĠĠĠĠĠ Ġnot Existing Endpoints Ġ= Ġset Of (" send ", Ġ" metadata ", Ġ" dictionary ") ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġno Ġconfigurations `() Ġ{ ĊĠĠĠ Ġdo Test Empty Versions ("") ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġempty Ġconfiguration `() Ġ{ ĊĠĠĠ Ġdo Test Empty Versions ("{} ") ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġmultiple Ġempty Ġconfigurations `() Ġ{ ĊĠĠĠ Ġdo Test Empty Versions (" {}, Ġ{} ") ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġconfiguration Ġwithout Ġtype `() Ġ{ ĊĠĠĠ Ġdo Test Empty Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" from ": Ġ 0 , ĊĠĠĠ Ġ" to ": Ġ 2 5 6 ĊĠ Ġ}] Ċ } Ċ """) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġconfiguration Ġwithout Ġbuckets `() Ġ{ ĊĠĠĠ Ġdo Test Empty Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE " ĊĠ Ġ}] Ċ } Ċ """) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġconfiguration Ġwith Ġbuckets `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ}] Ċ } Ċ """, Ġconfigs , Ġnot Existing Config Ġ= Ġset Of ( E AP )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġconfiguration Ġwith Ġmultiple Ġbuckets `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))), ĊĠĠĠĠĠ ĠE AP Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 0 , Ġ 6 4 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ}, Ġ{ ĊĠĠĠ Ġ" release Type ": Ġ" E AP ", ĊĠĠĠ Ġ" from " Ġ: Ġ 0 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 6 4 ĊĠ Ġ}] Ċ } Ċ """, Ġconfigs ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġconfiguration Ġwith Ġmultiple Ġbuckets Ġfor Ġthe Ġsame Ġtype `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range Ġ( 3 2 , Ġ 1 2 8 ), ĠEvent Log Bucket Range ( 0 , Ġ 6 4 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ},{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 0 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 6 4 ĊĠ Ġ}] Ċ } Ċ """, Ġconfigs , Ġnot Existing Config Ġ= Ġset Of ( E AP )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġconfiguration Ġwith Ġall Ġtypes `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))), ĊĠĠĠĠĠ ĠE AP Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))), ĊĠĠĠĠĠ ĠUNKNOWN Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" ALL ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ}] Ċ } Ċ """, Ġconfigs ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġmultiple Ġfilters `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))), ĊĠĠĠĠĠ ĠE AP Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 0 , Ġ 6 4 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ},{ ĊĠĠĠ Ġ" release Type ": Ġ" E AP ", ĊĠĠĠ Ġ" from " Ġ: Ġ 0 , ĊĠĠĠ Ġ" to " Ġ: Ġ 6 4 ĊĠ Ġ}] Ċ } Ċ """, Ġconfigs ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġendpoints Ġfrom Ġversion `() Ġ{ ĊĠĠĠ Ġval Ġendpoints Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ Ġ" send " Ġto Ġ" https :// send / endpoint ", ĊĠĠĠĠĠ Ġ" metadata " Ġto Ġ" https :// metadata / endpoint /", ĊĠĠĠĠĠ Ġ" dictionary " Ġto Ġ" https :// dictionary / endpoint /" ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ}], ĊĠ Ġ" endpoints ": Ġ{ ĊĠĠĠ Ġ" send ": Ġ" https :// send / endpoint ", ĊĠĠĠ Ġ" metadata ": Ġ" https :// metadata / endpoint /", ĊĠĠĠ Ġ" dictionary ": Ġ" https :// dictionary / endpoint /" ĊĠ Ġ} Ċ } """, Ġconfigs , Ġexisting Endpoints Ġ= Ġendpoints ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġempty Ġendpoints `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ}], ĊĠ Ġ" endpoints ": Ġ{ ĊĠ Ġ} Ċ } """, Ġconfigs , Ġnot Existing Endpoints Ġ= Ġset Of (" send ", Ġ" metadata ", Ġ" dictionary ")) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġno Ġendpoints `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 3 2 , Ġ 1 2 8 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ}] Ċ } """, Ġconfigs , Ġnot Existing Endpoints Ġ= Ġset Of (" send ", Ġ" metadata ", Ġ" dictionary ")) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġfirst Ġversion Ġis Ġapplicable `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 0 , Ġ 6 4 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 8 . 3 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 0 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 6 4 ĊĠ Ġ}] Ċ }, Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" E AP ", ĊĠĠĠ Ġ" from " Ġ: Ġ 3 2 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 1 2 8 ĊĠ Ġ}] Ċ } """, Ġconfigs , Ġnot Existing Config Ġ= Ġset Of ( E AP )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġsecond Ġversion Ġis Ġapplicable `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠE AP Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 1 2 8 , Ġ 2 5 6 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 3 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 0 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 6 4 ĊĠ Ġ}] Ċ }, Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" E AP ", ĊĠĠĠ Ġ" from " Ġ: Ġ 1 2 8 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 2 5 6 ĊĠ Ġ}] Ċ } """, Ġconfigs , Ġnot Existing Config Ġ= Ġset Of ( RELEASE )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġno Ġapplicable Ġversions `() Ġ{ ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 3 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" RELEASE ", ĊĠĠĠ Ġ" from " Ġ: Ġ 0 , ĠĊĠĠĠ Ġ" to " Ġ: Ġ 6 4 ĊĠ Ġ}] Ċ }, Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 2 0 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" E AP ", ĊĠĠĠ Ġ" from " Ġ: Ġ 1 2 8 , ĊĠĠĠ Ġ" to " Ġ: Ġ 2 5 6 ĊĠ Ġ}] Ċ } """, Ġnot Existing Config Ġ= ĠBUILD _ TYPES ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġaction Ġwithout Ġendpoints Ġand Ġconfigurations `() Ġ{ ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ} Ċ } """, Ġnot Existing Config Ġ= ĠBUILD _ TYPES , Ġnot Existing Endpoints Ġ= ĠEND POINTS ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġaction Ġwithout Ġendpoints `() Ġ{ ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠE AP Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 1 2 8 , Ġ 2 5 6 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠ Ġ" release Type ": Ġ" E AP ", ĊĠĠĠ Ġ" from " Ġ: Ġ 1 2 8 , ĊĠĠĠ Ġ" to " Ġ: Ġ 2 5 6 ĊĠ Ġ}] Ċ } """, Ġconfigs , Ġnot Existing Config Ġ= Ġset Of ( RELEASE ), Ġnot Existing Endpoints Ġ= ĠEND POINTS ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġaction Ġwithout Ġconfigurations `() Ġ{ ĊĠĠĠ Ġval Ġendpoints Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ Ġ" send " Ġto Ġ" https :// send / endpoint ", ĊĠĠĠĠĠ Ġ" dictionary " Ġto Ġ" https :// dictionary / endpoint /" ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test Versions (""" Ċ { ĊĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 1 " ĊĠ Ġ}, ĊĠ Ġ" endpoints ": Ġ{ ĊĠĠĠ Ġ" send ": Ġ" https :// send / endpoint ", ĊĠĠĠ Ġ" dictionary ": Ġ" https :// dictionary / endpoint /" ĊĠ Ġ} Ċ } """, Ġnot Existing Config Ġ= ĠBUILD _ TYPES , Ġexisting Endpoints Ġ= Ġendpoints ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġconfig `() Ġ{ ĊĠĠĠ Ġval Ġendpoints Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ Ġ" send " Ġto Ġ" https :// send / endpoint ", ĊĠĠĠĠĠ Ġ" metadata " Ġto Ġ" https :// metadata / endpoint /", ĊĠĠĠĠĠ Ġ" dictionary " Ġto Ġ" https :// dictionary / endpoint /" ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 0 , Ġ 2 5 6 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test (""" Ċ { ĊĠ Ġ" product Code ": Ġ" IU ", ĊĠ Ġ" versions ": Ġ[ ĊĠĠĠ Ġ{ ĊĠĠĠĠĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠĠĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 2 " ĊĠĠĠĠĠ Ġ}, ĊĠĠĠĠĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠĠĠĠĠ Ġ" release Type ": Ġ" ALL ", ĊĠĠĠĠĠĠĠ Ġ" from ": Ġ 0 , ĠĊĠĠĠĠĠĠĠ Ġ" to ": Ġ 2 5 6 ĊĠĠĠĠĠ Ġ}], ĊĠĠĠĠĠ Ġ" endpoints ": Ġ{ ĊĠĠĠĠĠĠĠ Ġ" send ": Ġ" https :// send / endpoint ", ĊĠĠĠĠĠĠĠ Ġ" metadata ": Ġ" https :// metadata / endpoint /", ĊĠĠĠĠĠĠĠ Ġ" dictionary ": Ġ" https :// dictionary / endpoint /" ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ] Ċ } """, Ġconfigs , Ġendpoints ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġconfig Ġwithout Ġproduct Ġcode `() Ġ{ ĊĠĠĠ Ġval Ġendpoints Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ Ġ" send " Ġto Ġ" https :// send / endpoint ", ĊĠĠĠĠĠ Ġ" metadata " Ġto Ġ" https :// metadata / endpoint /", ĊĠĠĠĠĠ Ġ" dictionary " Ġto Ġ" https :// dictionary / endpoint /" ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġconfigs Ġ= Ġhash Map Of ( ĊĠĠĠĠĠ ĠRELEASE Ġto Ġnew Config ( array ListOf ( Event Log Bucket Range ( 0 , Ġ 2 5 6 ))) ĊĠĠĠ Ġ) ĊĠĠĠ Ġdo Test (""" Ċ { ĊĠ Ġ" product Code ": Ġ" IU ", ĊĠ Ġ" versions ": Ġ[{ ĊĠĠĠĠĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠĠĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 2 " ĊĠĠĠĠĠ Ġ}, ĊĠĠĠĠĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠĠĠĠĠ Ġ" release Type ": Ġ" ALL ", ĊĠĠĠĠĠĠĠ Ġ" from ": Ġ 0 , ĠĊĠĠĠĠĠĠĠ Ġ" to ": Ġ 2 5 6 ĊĠĠĠĠĠ Ġ}], ĊĠĠĠĠĠ Ġ" endpoints ": Ġ{ ĊĠĠĠĠĠĠĠ Ġ" send ": Ġ" https :// send / endpoint ", ĊĠĠĠĠĠĠĠ Ġ" metadata ": Ġ" https :// metadata / endpoint /", ĊĠĠĠĠĠĠĠ Ġ" dictionary ": Ġ" https :// dictionary / endpoint /" ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ] Ċ } """, Ġconfigs , Ġendpoints ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġempty Ġsettings `() Ġ{ ĊĠĠĠ Ġdo Test (" {}", Ġempty Map (), Ġempty Map ()) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġsettings Ġwithout Ġversions `() Ġ{ ĊĠĠĠ Ġdo Test (""" Ċ { ĊĠ Ġ" product Code ": Ġ" IU " Ċ } """, Ġempty Map (), Ġempty Map ()) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġsettings Ġwith Ġempty Ġversions `() Ġ{ ĊĠĠĠ Ġdo Test (""" Ċ { ĊĠ Ġ" product Code ": Ġ" IU ", ĊĠ Ġ" versions ": Ġ[] Ċ } """, Ġempty Map (), Ġempty Map ()) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġsettings Ġwith Ġempty Ġversion Ġobject `() Ġ{ ĊĠĠĠ Ġdo Test (""" Ċ { ĊĠ Ġ" product Code ": Ġ" IU ", ĊĠ Ġ" versions ": Ġ[ {}] Ċ } """, Ġempty Map (), Ġempty Map ()) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġparse Ġduplicate Ġendpoints `() Ġ{ ĊĠĠĠ Ġdo Test Error (""" Ċ { ĊĠ Ġ" product Code ": Ġ" IU ", ĊĠ Ġ" versions ": Ġ[ ĊĠĠĠ Ġ{ ĊĠĠĠĠĠ Ġ" major Build Version B orders ": Ġ{ ĊĠĠĠĠĠĠĠ Ġ" from ": Ġ" 2 0 1 9 . 2 " ĊĠĠĠĠĠ Ġ}, ĊĠĠĠĠĠ Ġ" release Filters ": Ġ[{ ĊĠĠĠĠĠĠĠ Ġ" release Type ": Ġ" ALL ", ĊĠĠĠĠĠĠĠ Ġ" from ": Ġ 0 , ĠĊĠĠĠĠĠĠĠ Ġ" to ": Ġ 2 5 6 ĊĠĠĠĠĠ Ġ}], ĊĠĠĠĠĠ Ġ" endpoints ": Ġ{ ĊĠĠĠĠĠĠĠ Ġ" send ": Ġ" https :// send / endpoint ", ĊĠĠĠĠĠĠĠ Ġ" send ": Ġ" https :// send / second / endpoint ", ĊĠĠĠĠĠĠĠ Ġ" metadata ": Ġ" https :// metadata / endpoint /", ĊĠĠĠĠĠĠĠ Ġ" dictionary ": Ġ" https :// dictionary / endpoint /" ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ] Ċ } """) ĊĠ Ġ} Ċ } Ċ