add tests and move from label to constraint

Signed-off-by: Victor Vieux <vieux@docker.com>