Test cases for " Affinity / Anti-affinity Rules" is posted here - https://cwiki.apache.org/confluence/display/CLOUDSTACK/Test+Paln+for+Affinity-Anti-affinity+Rules.
Reference FS: - https://cwiki.apache.org/confluence/display/CLOUDSTACK/FS+-+Affinity-Anti-affinity+groups Please review and provide your feedback. Thanks, Sangeetha