@@ -6636,7 +6636,7 @@ func TestValidateAtLeastOneOfAttributes(t *testing.T) {
66366636 }
66376637}
66386638
6639- func TestValidateAllOfAttributes (t * testing.T ) {
6639+ func TestValidateRequiredWithAttributes (t * testing.T ) {
66406640 cases := map [string ]struct {
66416641 Key string
66426642 Schema map [string ]* Schema
@@ -6648,14 +6648,14 @@ func TestValidateAllOfAttributes(t *testing.T) {
66486648 Key : "whitelist" ,
66496649 Schema : map [string ]* Schema {
66506650 "whitelist" : {
6651- Type : TypeBool ,
6652- Optional : true ,
6653- AllOf : []string {"blacklist" },
6651+ Type : TypeBool ,
6652+ Optional : true ,
6653+ RequiredWith : []string {"blacklist" },
66546654 },
66556655 "blacklist" : {
6656- Type : TypeBool ,
6657- Optional : true ,
6658- AllOf : []string {"whitelist" },
6656+ Type : TypeBool ,
6657+ Optional : true ,
6658+ RequiredWith : []string {"whitelist" },
66596659 },
66606660 },
66616661
@@ -6670,14 +6670,14 @@ func TestValidateAllOfAttributes(t *testing.T) {
66706670 Key : "whitelist" ,
66716671 Schema : map [string ]* Schema {
66726672 "whitelist" : {
6673- Type : TypeBool ,
6674- Optional : true ,
6675- AllOf : []string {"blacklist" },
6673+ Type : TypeBool ,
6674+ Optional : true ,
6675+ RequiredWith : []string {"blacklist" },
66766676 },
66776677 "blacklist" : {
6678- Type : TypeBool ,
6679- Optional : true ,
6680- AllOf : []string {"whitelist" },
6678+ Type : TypeBool ,
6679+ Optional : true ,
6680+ RequiredWith : []string {"whitelist" },
66816681 },
66826682 },
66836683
@@ -6691,14 +6691,14 @@ func TestValidateAllOfAttributes(t *testing.T) {
66916691 Key : "whitelist" ,
66926692 Schema : map [string ]* Schema {
66936693 "whitelist" : {
6694- Type : TypeBool ,
6695- Optional : true ,
6696- AllOf : []string {"blacklist" },
6694+ Type : TypeBool ,
6695+ Optional : true ,
6696+ RequiredWith : []string {"blacklist" },
66976697 },
66986698 "blacklist" : {
6699- Type : TypeBool ,
6700- Optional : true ,
6701- AllOf : []string {"whitelist" },
6699+ Type : TypeBool ,
6700+ Optional : true ,
6701+ RequiredWith : []string {"whitelist" },
67026702 },
67036703 },
67046704
@@ -6710,19 +6710,19 @@ func TestValidateAllOfAttributes(t *testing.T) {
67106710 Key : "whitelist" ,
67116711 Schema : map [string ]* Schema {
67126712 "whitelist" : {
6713- Type : TypeBool ,
6714- Optional : true ,
6715- AllOf : []string {"purplelist" },
6713+ Type : TypeBool ,
6714+ Optional : true ,
6715+ RequiredWith : []string {"purplelist" },
67166716 },
67176717 "blacklist" : {
6718- Type : TypeBool ,
6719- Optional : true ,
6720- AllOf : []string {"whitelist" , "purplelist" },
6718+ Type : TypeBool ,
6719+ Optional : true ,
6720+ RequiredWith : []string {"whitelist" , "purplelist" },
67216721 },
67226722 "purplelist" : {
6723- Type : TypeBool ,
6724- Optional : true ,
6725- AllOf : []string {"whitelist" },
6723+ Type : TypeBool ,
6724+ Optional : true ,
6725+ RequiredWith : []string {"whitelist" },
67266726 },
67276727 },
67286728
@@ -6737,19 +6737,19 @@ func TestValidateAllOfAttributes(t *testing.T) {
67376737 Key : "whitelist" ,
67386738 Schema : map [string ]* Schema {
67396739 "whitelist" : {
6740- Type : TypeBool ,
6741- Optional : true ,
6742- AllOf : []string {"blacklist" , "purplelist" },
6740+ Type : TypeBool ,
6741+ Optional : true ,
6742+ RequiredWith : []string {"blacklist" , "purplelist" },
67436743 },
67446744 "blacklist" : {
6745- Type : TypeBool ,
6746- Optional : true ,
6747- AllOf : []string {"whitelist" , "purplelist" },
6745+ Type : TypeBool ,
6746+ Optional : true ,
6747+ RequiredWith : []string {"whitelist" , "purplelist" },
67486748 },
67496749 "purplelist" : {
6750- Type : TypeBool ,
6751- Optional : true ,
6752- AllOf : []string {"whitelist" , "blacklist" },
6750+ Type : TypeBool ,
6751+ Optional : true ,
6752+ RequiredWith : []string {"whitelist" , "blacklist" },
67536753 },
67546754 },
67556755
@@ -6765,19 +6765,19 @@ func TestValidateAllOfAttributes(t *testing.T) {
67656765 Key : "whitelist" ,
67666766 Schema : map [string ]* Schema {
67676767 "whitelist" : {
6768- Type : TypeBool ,
6769- Optional : true ,
6770- AllOf : []string {"blacklist" , "purplelist" },
6768+ Type : TypeBool ,
6769+ Optional : true ,
6770+ RequiredWith : []string {"blacklist" , "purplelist" },
67716771 },
67726772 "blacklist" : {
6773- Type : TypeBool ,
6774- Optional : true ,
6775- AllOf : []string {"whitelist" , "purplelist" },
6773+ Type : TypeBool ,
6774+ Optional : true ,
6775+ RequiredWith : []string {"whitelist" , "purplelist" },
67766776 },
67776777 "purplelist" : {
6778- Type : TypeBool ,
6779- Optional : true ,
6780- AllOf : []string {"whitelist" , "blacklist" },
6778+ Type : TypeBool ,
6779+ Optional : true ,
6780+ RequiredWith : []string {"whitelist" , "blacklist" },
67816781 },
67826782 },
67836783
@@ -6791,19 +6791,19 @@ func TestValidateAllOfAttributes(t *testing.T) {
67916791 Key : "whitelist" ,
67926792 Schema : map [string ]* Schema {
67936793 "whitelist" : {
6794- Type : TypeBool ,
6795- Optional : true ,
6796- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6794+ Type : TypeBool ,
6795+ Optional : true ,
6796+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
67976797 },
67986798 "blacklist" : {
6799- Type : TypeBool ,
6800- Optional : true ,
6801- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6799+ Type : TypeBool ,
6800+ Optional : true ,
6801+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
68026802 },
68036803 "purplelist" : {
6804- Type : TypeBool ,
6805- Optional : true ,
6806- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6804+ Type : TypeBool ,
6805+ Optional : true ,
6806+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
68076807 },
68086808 },
68096809
@@ -6814,19 +6814,19 @@ func TestValidateAllOfAttributes(t *testing.T) {
68146814 "Only Unknown Variable Value" : {
68156815 Schema : map [string ]* Schema {
68166816 "whitelist" : {
6817- Type : TypeBool ,
6818- Optional : true ,
6819- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6817+ Type : TypeBool ,
6818+ Optional : true ,
6819+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
68206820 },
68216821 "blacklist" : {
6822- Type : TypeBool ,
6823- Optional : true ,
6824- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6822+ Type : TypeBool ,
6823+ Optional : true ,
6824+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
68256825 },
68266826 "purplelist" : {
6827- Type : TypeBool ,
6828- Optional : true ,
6829- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6827+ Type : TypeBool ,
6828+ Optional : true ,
6829+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
68306830 },
68316831 },
68326832
@@ -6840,16 +6840,16 @@ func TestValidateAllOfAttributes(t *testing.T) {
68406840 "only unknown list value" : {
68416841 Schema : map [string ]* Schema {
68426842 "whitelist" : {
6843- Type : TypeList ,
6844- Optional : true ,
6845- Elem : & Schema {Type : TypeString },
6846- AllOf : []string {"whitelist" , "blacklist" },
6843+ Type : TypeList ,
6844+ Optional : true ,
6845+ Elem : & Schema {Type : TypeString },
6846+ RequiredWith : []string {"whitelist" , "blacklist" },
68476847 },
68486848 "blacklist" : {
6849- Type : TypeList ,
6850- Optional : true ,
6851- Elem : & Schema {Type : TypeString },
6852- AllOf : []string {"whitelist" , "blacklist" },
6849+ Type : TypeList ,
6850+ Optional : true ,
6851+ Elem : & Schema {Type : TypeString },
6852+ RequiredWith : []string {"whitelist" , "blacklist" },
68536853 },
68546854 },
68556855
@@ -6863,19 +6863,19 @@ func TestValidateAllOfAttributes(t *testing.T) {
68636863 "Unknown Variable Value and Known Value" : {
68646864 Schema : map [string ]* Schema {
68656865 "whitelist" : {
6866- Type : TypeBool ,
6867- Optional : true ,
6868- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6866+ Type : TypeBool ,
6867+ Optional : true ,
6868+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
68696869 },
68706870 "blacklist" : {
6871- Type : TypeBool ,
6872- Optional : true ,
6873- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6871+ Type : TypeBool ,
6872+ Optional : true ,
6873+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
68746874 },
68756875 "purplelist" : {
6876- Type : TypeBool ,
6877- Optional : true ,
6878- AllOf : []string {"whitelist" , "blacklist" , "purplelist" },
6876+ Type : TypeBool ,
6877+ Optional : true ,
6878+ RequiredWith : []string {"whitelist" , "blacklist" , "purplelist" },
68796879 },
68806880 },
68816881
0 commit comments